diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2023-07-18 11:10:57 +0100 |
---|---|---|
committer | Anthony PERARD <anthony.perard@citrix.com> | 2023-08-01 10:22:33 +0100 |
commit | bcb40db010517120dfffccc77cef9e4fcd3235fa (patch) | |
tree | 3bf6126fd98bab4626d7cb814dc3ba5e74c7f525 /include/hw/xen | |
parent | f4f71363fcdb1092ff64d2bba6f9af39570c2f2b (diff) |
xen: Don't pass MemoryListener around by value
Coverity points out (CID 1513106, 1513107) that MemoryListener is a
192 byte struct which we are passing around by value. Switch to
passing a const pointer into xen_register_ioreq() and then to
xen_do_ioreq_register(). We can also make the file-scope
MemoryListener variables const, since nothing changes them.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230718101057.1110979-1-peter.maydell@linaro.org>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Diffstat (limited to 'include/hw/xen')
-rw-r--r-- | include/hw/xen/xen-hvm-common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/hw/xen/xen-hvm-common.h b/include/hw/xen/xen-hvm-common.h index f9559e2885..4e9904f1a6 100644 --- a/include/hw/xen/xen-hvm-common.h +++ b/include/hw/xen/xen-hvm-common.h @@ -93,7 +93,7 @@ void xen_device_unrealize(DeviceListener *listener, DeviceState *dev); void xen_hvm_change_state_handler(void *opaque, bool running, RunState rstate); void xen_register_ioreq(XenIOState *state, unsigned int max_cpus, - MemoryListener xen_memory_listener); + const MemoryListener *xen_memory_listener); void cpu_ioreq_pio(ioreq_t *req); #endif /* HW_XEN_HVM_COMMON_H */ |