xref: /openbmc/qemu/include/hw/remote/machine.h (revision 9ac873a46963098441be920ef7a2eaf244a3352d)
13f0e7e57SJagannathan Raman /*
23f0e7e57SJagannathan Raman  * Remote machine configuration
33f0e7e57SJagannathan Raman  *
43f0e7e57SJagannathan Raman  * Copyright © 2018, 2021 Oracle and/or its affiliates.
53f0e7e57SJagannathan Raman  *
63f0e7e57SJagannathan Raman  * This work is licensed under the terms of the GNU GPL, version 2 or later.
73f0e7e57SJagannathan Raman  * See the COPYING file in the top-level directory.
83f0e7e57SJagannathan Raman  *
93f0e7e57SJagannathan Raman  */
103f0e7e57SJagannathan Raman 
113f0e7e57SJagannathan Raman #ifndef REMOTE_MACHINE_H
123f0e7e57SJagannathan Raman #define REMOTE_MACHINE_H
133f0e7e57SJagannathan Raman 
143f0e7e57SJagannathan Raman #include "qom/object.h"
153f0e7e57SJagannathan Raman #include "hw/boards.h"
163f0e7e57SJagannathan Raman #include "hw/pci-host/remote.h"
1748b06f50SJagannathan Raman #include "io/channel.h"
18bd36adb8SJagannathan Raman #include "hw/remote/iohub.h"
193f0e7e57SJagannathan Raman 
203f0e7e57SJagannathan Raman struct RemoteMachineState {
213f0e7e57SJagannathan Raman     MachineState parent_obj;
223f0e7e57SJagannathan Raman 
233f0e7e57SJagannathan Raman     RemotePCIHost *host;
24bd36adb8SJagannathan Raman     RemoteIOHubState iohub;
259b5b473eSJagannathan Raman 
269b5b473eSJagannathan Raman     bool vfio_user;
27*8f9a9259SJagannathan Raman 
28*8f9a9259SJagannathan Raman     bool auto_shutdown;
293f0e7e57SJagannathan Raman };
303f0e7e57SJagannathan Raman 
3148b06f50SJagannathan Raman /* Used to pass to co-routine device and ioc. */
3248b06f50SJagannathan Raman typedef struct RemoteCommDev {
3348b06f50SJagannathan Raman     PCIDevice *dev;
3448b06f50SJagannathan Raman     QIOChannel *ioc;
3548b06f50SJagannathan Raman } RemoteCommDev;
3648b06f50SJagannathan Raman 
373f0e7e57SJagannathan Raman #define TYPE_REMOTE_MACHINE "x-remote-machine"
383f0e7e57SJagannathan Raman OBJECT_DECLARE_SIMPLE_TYPE(RemoteMachineState, REMOTE_MACHINE)
393f0e7e57SJagannathan Raman 
4048b06f50SJagannathan Raman void coroutine_fn mpqemu_remote_msg_loop_co(void *data);
4148b06f50SJagannathan Raman 
423f0e7e57SJagannathan Raman #endif
43