qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH-for-9.0 4/9] hw/xen/hvm: Expose xen_memory_listener declarati


From: Manos Pitsidianakis
Subject: Re: [PATCH-for-9.0 4/9] hw/xen/hvm: Expose xen_memory_listener declaration
Date: Thu, 07 Mar 2024 13:54:35 +0200
User-agent: meli 0.8.5-rc.3

On Tue, 14 Nov 2023 18:31, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
There can only be a single xen_memory_listener definition
in a qemu-system binary.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/xen/xen-hvm-common.h | 1 +
hw/arm/xen_arm.c                | 2 +-
hw/i386/xen/xen-hvm.c           | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/hw/xen/xen-hvm-common.h b/include/hw/xen/xen-hvm-common.h
index 83ed16f425..0fed15ed04 100644
--- a/include/hw/xen/xen-hvm-common.h
+++ b/include/hw/xen/xen-hvm-common.h
@@ -18,6 +18,7 @@
extern MemoryRegion xen_memory;
extern MemoryListener xen_io_listener;
extern DeviceListener xen_device_listener;
+extern const MemoryListener xen_memory_listener;

//#define DEBUG_XEN_HVM

diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c
index b478d74ea0..39dcd74d07 100644
--- a/hw/arm/xen_arm.c
+++ b/hw/arm/xen_arm.c
@@ -38,7 +38,7 @@
#define TYPE_XEN_ARM  MACHINE_TYPE_NAME("xenpvh")
OBJECT_DECLARE_SIMPLE_TYPE(XenArmState, XEN_ARM)

-static const MemoryListener xen_memory_listener = {
+const MemoryListener xen_memory_listener = {
    .region_add = xen_region_add,
    .region_del = xen_region_del,
    .log_start = NULL,
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index b64204ea94..a65a96f0de 100644
--- a/hw/i386/xen/xen-hvm.c
+++ b/hw/i386/xen/xen-hvm.c
@@ -469,7 +469,7 @@ static void xen_log_global_stop(MemoryListener *listener)
    xen_in_migration = false;
}

-static const MemoryListener xen_memory_listener = {
+const MemoryListener xen_memory_listener = {
    .name = "xen-memory",
    .region_add = xen_region_add,
    .region_del = xen_region_del,
--
2.41.0




Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]