aboutsummaryrefslogtreecommitdiff
path: root/hw/remote/proxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/remote/proxy.c')
-rw-r--r--hw/remote/proxy.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/remote/proxy.c b/hw/remote/proxy.c
index 22eb422231..472b2df335 100644
--- a/hw/remote/proxy.c
+++ b/hw/remote/proxy.c
@@ -19,6 +19,8 @@
#include "qemu/sockets.h"
#include "hw/remote/mpqemu-link.h"
#include "qemu/error-report.h"
+#include "hw/remote/proxy-memory-listener.h"
+#include "qom/object.h"
static void pci_proxy_dev_realize(PCIDevice *device, Error **errp)
{
@@ -52,6 +54,8 @@ static void pci_proxy_dev_realize(PCIDevice *device, Error **errp)
qemu_mutex_init(&dev->io_mutex);
qio_channel_set_blocking(dev->ioc, true, NULL);
+
+ proxy_memory_listener_configure(&dev->proxy_listener, dev->ioc);
}
static void pci_proxy_dev_exit(PCIDevice *pdev)
@@ -65,6 +69,8 @@ static void pci_proxy_dev_exit(PCIDevice *pdev)
migrate_del_blocker(dev->migration_blocker);
error_free(dev->migration_blocker);
+
+ proxy_memory_listener_deconfigure(&dev->proxy_listener);
}
static void config_op_send(PCIProxyDev *pdev, uint32_t addr, uint32_t *val,