From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org,
"Daniel Henrique Barboza" <danielhb413@gmail.com>,
qemu-block@nongnu.org, "Jesper Devantier" <foss@defmacro.it>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
"Troy Lee" <leetroy@gmail.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Hanna Reitz" <hreitz@redhat.com>,
qemu-s390x@nongnu.org, "Halil Pasic" <pasic@linux.ibm.com>,
"Kevin Wolf" <kwolf@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu-trivial@nongnu.org,
"Dmitry Fleytman" <dmitry.fleytman@gmail.com>,
"Jason Wang" <jasowang@redhat.com>,
"Keith Busch" <kbusch@kernel.org>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Frédéric Barrat" <fbarrat@linux.ibm.com>,
"Fam Zheng" <fam@euphon.net>,
"Sven Schnelle" <svens@stackframe.org>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Joel Stanley" <joel@jms.id.au>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
qemu-arm@nongnu.org, "Hannes Reinecke" <hare@suse.com>,
"Klaus Jensen" <its@irrelevant.dk>,
"Jeuk Kim" <jeuk20.kim@samsung.com>,
"Andrew Jeffery" <andrew@codeconstruct.com.au>,
"Alistair Francis" <alistair@alistair23.me>,
"Thomas Huth" <thuth@redhat.com>,
"Michael Tokarev" <mjt@tls.msk.ru>,
"Laurent Vivier" <laurent@vivier.eu>,
"Rob Herring" <robh@kernel.org>,
"Steven Lee" <steven_lee@aspeedtech.com>,
"Jamin Lin" <jamin_lin@aspeedtech.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
"Cédric Le Goater" <clg@kaod.org>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Klaus Jensen" <k.jensen@samsung.com>
Subject: [PULL 24/31] hw/ppc/pnv_occ: skip automatic zero-init of large struct
Date: Wed, 11 Jun 2025 14:25:26 -0400 [thread overview]
Message-ID: <20250611182533.200590-25-stefanha@redhat.com> (raw)
In-Reply-To: <20250611182533.200590-1-stefanha@redhat.com>
From: Daniel P. Berrangé <berrange@redhat.com>
The 'occ_model_tick' method has a 12k struct used for copying
data between guest and host. Skip the automatic zero-init of this
struct to eliminate the performance overhead in the I/O hot path.
The 'dynamic_data' buffer will be fully initialized when reading
data from the guest.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Message-id: 20250610123709.835102-25-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
hw/ppc/pnv_occ.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ppc/pnv_occ.c b/hw/ppc/pnv_occ.c
index fa6f31cb8d..24b789c191 100644
--- a/hw/ppc/pnv_occ.c
+++ b/hw/ppc/pnv_occ.c
@@ -789,7 +789,7 @@ static bool occ_opal_process_command(PnvOCC *occ,
static bool occ_model_tick(PnvOCC *occ)
{
- struct occ_dynamic_data dynamic_data;
+ QEMU_UNINITIALIZED struct occ_dynamic_data dynamic_data;
if (!occ_read_dynamic_data(occ, &dynamic_data, NULL)) {
/* Can't move OCC state field to safe because we can't map it! */
--
2.49.0
next prev parent reply other threads:[~2025-06-11 18:38 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-11 18:25 [PULL 00/31] Block patches Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 01/31] include/qemu/compiler: add QEMU_UNINITIALIZED attribute macro Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 02/31] hw/virtio/virtio: avoid cost of -ftrivial-auto-var-init in hot path Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 03/31] block: skip automatic zero-init of large array in ioq_submit Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 04/31] chardev/char-fd: skip automatic zero-init of large array Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 05/31] chardev/char-pty: " Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 06/31] chardev/char-socket: " Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 07/31] hw/audio/ac97: skip automatic zero-init of large arrays Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 08/31] hw/audio/cs4231a: " Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 09/31] hw/audio/es1370: skip automatic zero-init of large array Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 10/31] hw/audio/gus: " Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 11/31] " Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 12/31] hw/audio/sb16: " Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 13/31] hw/audio/via-ac97: " Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 14/31] hw/char/sclpconsole-lm: " Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 15/31] hw/dma/xlnx_csu_dma: " Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 16/31] hw/display/vmware_vga: skip automatic zero-init of large struct Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 17/31] hw/hyperv/syndbg: skip automatic zero-init of large array Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 18/31] hw/misc/aspeed_hace: " Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 19/31] hw/net/rtl8139: " Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 20/31] hw/net/tulip: " Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 21/31] hw/net/virtio-net: skip automatic zero-init of large arrays Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 22/31] hw/net/xgamc: skip automatic zero-init of large array Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 23/31] hw/nvme/ctrl: skip automatic zero-init of large arrays Stefan Hajnoczi
2025-06-11 18:25 ` Stefan Hajnoczi [this message]
2025-06-11 18:25 ` [PULL 25/31] hw/ppc/spapr_tpm_proxy: " Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 26/31] hw/usb/hcd-ohci: skip automatic zero-init of large array Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 27/31] hw/scsi/lsi53c895a: " Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 28/31] hw/scsi/megasas: skip automatic zero-init of large arrays Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 29/31] hw/ufs/lu: skip automatic zero-init of large array Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 30/31] net/socket: " Stefan Hajnoczi
2025-06-11 18:25 ` [PULL 31/31] net/stream: " Stefan Hajnoczi
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=20250611182533.200590-25-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=alistair@alistair23.me \
--cc=andrew@codeconstruct.com.au \
--cc=berrange@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=clg@kaod.org \
--cc=danielhb413@gmail.com \
--cc=dmitry.fleytman@gmail.com \
--cc=edgar.iglesias@gmail.com \
--cc=fam@euphon.net \
--cc=fbarrat@linux.ibm.com \
--cc=foss@defmacro.it \
--cc=hare@suse.com \
--cc=harshpb@linux.ibm.com \
--cc=hreitz@redhat.com \
--cc=its@irrelevant.dk \
--cc=jamin_lin@aspeedtech.com \
--cc=jasowang@redhat.com \
--cc=jeuk20.kim@samsung.com \
--cc=joel@jms.id.au \
--cc=k.jensen@samsung.com \
--cc=kbusch@kernel.org \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=laurent@vivier.eu \
--cc=leetroy@gmail.com \
--cc=marcandre.lureau@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=mst@redhat.com \
--cc=npiggin@gmail.com \
--cc=pasic@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=robh@kernel.org \
--cc=steven_lee@aspeedtech.com \
--cc=svens@stackframe.org \
--cc=thuth@redhat.com \
/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).