From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Anthony Perard <anthony.perard@citrix.com>,
Paul Durrant <paul@xen.org>, David Woodhouse <dwmw@amazon.co.uk>
Subject: Re: [PATCH for-8.1] xen: Don't pass MemoryListener around by value
Date: Tue, 18 Jul 2023 13:21:42 +0200 [thread overview]
Message-ID: <549711e4-e76c-1d1e-0d4b-6cdbc6394245@linaro.org> (raw)
In-Reply-To: <20230718101057.1110979-1-peter.maydell@linaro.org>
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>
next prev parent reply other threads:[~2023-07-18 11:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 10:10 [PATCH for-8.1] xen: Don't pass MemoryListener around by value Peter Maydell
2023-07-18 11:21 ` Philippe Mathieu-Daudé [this message]
2023-07-18 14:02 ` Anthony PERARD via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=549711e4-e76c-1d1e-0d4b-6cdbc6394245@linaro.org \
--to=philmd@linaro.org \
--cc=anthony.perard@citrix.com \
--cc=dwmw@amazon.co.uk \
--cc=paul@xen.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sstabellini@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).