[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 27/31] hw/scsi/lsi53c895a: skip automatic zero-init of large array
From: |
Stefan Hajnoczi |
Subject: |
[PULL 27/31] hw/scsi/lsi53c895a: skip automatic zero-init of large array |
Date: |
Wed, 11 Jun 2025 14:25:29 -0400 |
From: Daniel P. Berrangé <berrange@redhat.com>
The 'lsi_memcpy' method has a 4k byte array used for copying data
to/from the device. Skip the automatic zero-init of this array to
eliminate the performance overhead in the I/O hot path.
The 'buf' array will be fully initialized when data is copied.
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-28-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
hw/scsi/lsi53c895a.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c
index f4f2ef321e..9ea4aa0a85 100644
--- a/hw/scsi/lsi53c895a.c
+++ b/hw/scsi/lsi53c895a.c
@@ -1112,7 +1112,7 @@ bad:
static void lsi_memcpy(LSIState *s, uint32_t dest, uint32_t src, int count)
{
int n;
- uint8_t buf[LSI_BUF_SIZE];
+ QEMU_UNINITIALIZED uint8_t buf[LSI_BUF_SIZE];
trace_lsi_memcpy(dest, src, count);
while (count) {
--
2.49.0
- [PULL 16/31] hw/display/vmware_vga: skip automatic zero-init of large struct, (continued)
- [PULL 16/31] hw/display/vmware_vga: skip automatic zero-init of large struct, Stefan Hajnoczi, 2025/06/11
- [PULL 19/31] hw/net/rtl8139: skip automatic zero-init of large array, Stefan Hajnoczi, 2025/06/11
- [PULL 20/31] hw/net/tulip: skip automatic zero-init of large array, Stefan Hajnoczi, 2025/06/11
- [PULL 21/31] hw/net/virtio-net: skip automatic zero-init of large arrays, Stefan Hajnoczi, 2025/06/11
- [PULL 22/31] hw/net/xgamc: skip automatic zero-init of large array, Stefan Hajnoczi, 2025/06/11
- [PULL 23/31] hw/nvme/ctrl: skip automatic zero-init of large arrays, Stefan Hajnoczi, 2025/06/11
- [PULL 25/31] hw/ppc/spapr_tpm_proxy: skip automatic zero-init of large arrays, Stefan Hajnoczi, 2025/06/11
- [PULL 24/31] hw/ppc/pnv_occ: skip automatic zero-init of large struct, Stefan Hajnoczi, 2025/06/11
- [PULL 26/31] hw/usb/hcd-ohci: skip automatic zero-init of large array, Stefan Hajnoczi, 2025/06/11
- [PULL 28/31] hw/scsi/megasas: skip automatic zero-init of large arrays, Stefan Hajnoczi, 2025/06/11
- [PULL 27/31] hw/scsi/lsi53c895a: skip automatic zero-init of large array,
Stefan Hajnoczi <=
- [PULL 29/31] hw/ufs/lu: skip automatic zero-init of large array, Stefan Hajnoczi, 2025/06/11
- [PULL 31/31] net/stream: skip automatic zero-init of large array, Stefan Hajnoczi, 2025/06/11
- [PULL 30/31] net/socket: skip automatic zero-init of large array, Stefan Hajnoczi, 2025/06/11