50 lines
1.9 KiB
Diff
50 lines
1.9 KiB
Diff
From 4c88a2da13473491d30328f24239fe305ff037ef Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
|
Date: Tue, 10 Jun 2025 13:36:54 +0100
|
|
Subject: [PATCH 17/31] hw/display/vmware_vga: skip automatic zero-init of
|
|
large struct
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
RH-Author: Stefan Hajnoczi <stefanha@redhat.com>
|
|
RH-MergeRequest: 461: Solve -ftrivial-auto-var-init performance regression with QEMU_UNINITIALIZED
|
|
RH-Jira: RHEL-99887
|
|
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
RH-Commit: [16/30] 7b1073ec54071782a9ad32e17293b141bee639c4
|
|
|
|
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>
|
|
(cherry picked from commit 7048e70f391df76d009eecca25f8027858f9f304)
|
|
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
---
|
|
hw/display/vmware_vga.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
|
|
index 3db3ff98f7..69afe98a2f 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);
|
|
--
|
|
2.39.3
|
|
|