]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/display/vmware_vga: skip automatic zero-init of large struct
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 10 Jun 2025 12:36:54 +0000 (13:36 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 12 Jun 2025 17:40:15 +0000 (13:40 -0400)
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>
hw/display/vmware_vga.c

index 544bb65320ba7a48a0f977ba3ae4a564d7937632..bc1a8ed4665aff984cbac80f145801db9c05683e 100644 (file)
@@ -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);