qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH for-8.1] xen: Don't pass MemoryListener around by value


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH for-8.1] xen: Don't pass MemoryListener around by value
Date: Tue, 18 Jul 2023 13:21:42 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 18/7/23 12:10, Peter Maydell wrote:
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>
---
Disclaimer: I have not tested this beyond any testing you
get from 'make check' and 'make check-avocado', which is likely
not much.
---
  include/hw/xen/xen-hvm-common.h | 2 +-
  hw/arm/xen_arm.c                | 4 ++--
  hw/i386/xen/xen-hvm.c           | 4 ++--
  hw/xen/xen-hvm-common.c         | 8 ++++----
  4 files changed, 9 insertions(+), 9 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

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