multi-process: create IOHUB object to handle irq
[qemu/ar7.git] / include / hw / remote / proxy.h
blob741def71f1a51d99b0b209bd4dcb27968b055636
1 /*
2 * Copyright © 2018, 2021 Oracle and/or its affiliates.
4 * This work is licensed under the terms of the GNU GPL, version 2 or later.
5 * See the COPYING file in the top-level directory.
7 */
9 #ifndef PROXY_H
10 #define PROXY_H
12 #include "hw/pci/pci.h"
13 #include "io/channel.h"
14 #include "hw/remote/proxy-memory-listener.h"
15 #include "qemu/event_notifier.h"
17 #define TYPE_PCI_PROXY_DEV "x-pci-proxy-dev"
18 OBJECT_DECLARE_SIMPLE_TYPE(PCIProxyDev, PCI_PROXY_DEV)
20 typedef struct ProxyMemoryRegion {
21 PCIProxyDev *dev;
22 MemoryRegion mr;
23 bool memory;
24 bool present;
25 uint8_t type;
26 } ProxyMemoryRegion;
28 struct PCIProxyDev {
29 PCIDevice parent_dev;
30 char *fd;
33 * Mutex used to protect the QIOChannel fd from
34 * the concurrent access by the VCPUs since proxy
35 * blocks while awaiting for the replies from the
36 * process remote.
38 QemuMutex io_mutex;
39 QIOChannel *ioc;
40 Error *migration_blocker;
41 ProxyMemoryListener proxy_listener;
42 int virq;
43 EventNotifier intr;
44 EventNotifier resample;
45 ProxyMemoryRegion region[PCI_NUM_REGIONS];
48 #endif /* PROXY_H */