summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2025-06-10 13:36:54 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2025-06-12 13:40:15 -0400
commit7048e70f391df76d009eecca25f8027858f9f304 (patch)
tree7687edc2e5a4e2d65f7080a4bb4310a0af339a82
parentce14f24611aa0469b464a9512e192b4fd51dca2b (diff)
downloadfocaccia-qemu-7048e70f391df76d009eecca25f8027858f9f304.tar.gz
focaccia-qemu-7048e70f391df76d009eecca25f8027858f9f304.zip
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é <berrange@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20250610123709.835102-17-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r--hw/display/vmware_vga.c2
1 files changed, 1 insertions, 1 deletions
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);