machine.h 895 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Remote machine configuration
  3. *
  4. * Copyright © 2018, 2021 Oracle and/or its affiliates.
  5. *
  6. * This work is licensed under the terms of the GNU GPL, version 2 or later.
  7. * See the COPYING file in the top-level directory.
  8. *
  9. */
  10. #ifndef REMOTE_MACHINE_H
  11. #define REMOTE_MACHINE_H
  12. #include "qom/object.h"
  13. #include "hw/boards.h"
  14. #include "hw/pci-host/remote.h"
  15. #include "io/channel.h"
  16. #include "hw/remote/iohub.h"
  17. struct RemoteMachineState {
  18. MachineState parent_obj;
  19. RemotePCIHost *host;
  20. RemoteIOHubState iohub;
  21. bool vfio_user;
  22. bool auto_shutdown;
  23. };
  24. /* Used to pass to co-routine device and ioc. */
  25. typedef struct RemoteCommDev {
  26. PCIDevice *dev;
  27. QIOChannel *ioc;
  28. } RemoteCommDev;
  29. #define TYPE_REMOTE_MACHINE "x-remote-machine"
  30. OBJECT_DECLARE_SIMPLE_TYPE(RemoteMachineState, REMOTE_MACHINE)
  31. void coroutine_fn mpqemu_remote_msg_loop_co(void *data);
  32. #endif