From: Daniel P. Berrangé Date: Tue, 10 Jun 2025 12:36:53 +0000 (+0100) Subject: hw/dma/xlnx_csu_dma: skip automatic zero-init of large array X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce14f24611aa0469b464a9512e192b4fd51dca2b;p=thirdparty%2Fqemu.git hw/dma/xlnx_csu_dma: skip automatic zero-init of large array The 'xlnx_csu_dma_src_notify' method has a 4k byte array used for copying DMA data. 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é Reviewed-by: Stefan Hajnoczi Message-id: 20250610123709.835102-16-berrange@redhat.com Signed-off-by: Stefan Hajnoczi --- diff --git a/hw/dma/xlnx_csu_dma.c b/hw/dma/xlnx_csu_dma.c index 3db3904d83..d8c7da1a50 100644 --- a/hw/dma/xlnx_csu_dma.c +++ b/hw/dma/xlnx_csu_dma.c @@ -287,7 +287,7 @@ static uint32_t xlnx_csu_dma_advance(XlnxCSUDMA *s, uint32_t len) static void xlnx_csu_dma_src_notify(void *opaque) { XlnxCSUDMA *s = XLNX_CSU_DMA(opaque); - unsigned char buf[4 * 1024]; + QEMU_UNINITIALIZED unsigned char buf[4 * 1024]; size_t rlen = 0; ptimer_transaction_begin(s->src_timer);