From: Daniel P. Berrangé Date: Tue, 10 Jun 2025 12:36:54 +0000 (+0100) Subject: hw/display/vmware_vga: skip automatic zero-init of large struct X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7048e70f391df76d009eecca25f8027858f9f304;p=thirdparty%2Fqemu.git hw/display/vmware_vga: skip automatic zero-init of large struct The 'vmsvga_fifo_run' method has a struct which is a little over 20k in size, used for holding image data for cursor changes. Skip the automatic zero-init of this struct to eliminate the performance overhead in the I/O hot path. The cursor variable will be fully initialized only when processing a cursor definition message from the guest. Signed-off-by: Daniel P. Berrangé Reviewed-by: Stefan Hajnoczi Message-id: 20250610123709.835102-17-berrange@redhat.com Signed-off-by: Stefan Hajnoczi --- diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index 544bb65320..bc1a8ed466 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -618,7 +618,7 @@ static void vmsvga_fifo_run(struct vmsvga_state_s *s) uint32_t cmd, colour; int args, len, maxloop = 1024; int x, y, dx, dy, width, height; - struct vmsvga_cursor_definition_s cursor; + QEMU_UNINITIALIZED struct vmsvga_cursor_definition_s cursor; uint32_t cmd_start; len = vmsvga_fifo_length(s);