render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
9119d9
From 0e5c56e4aa3a08035f835b26dddfbb2be01880e2 Mon Sep 17 00:00:00 2001
9119d9
Message-Id: <0e5c56e4aa3a08035f835b26dddfbb2be01880e2@dist-git>
9119d9
From: Pavel Hrdina <phrdina@redhat.com>
9119d9
Date: Mon, 12 Jan 2015 15:00:41 +0100
9119d9
Subject: [PATCH] qxl: change the default value for vgamem_mb to 16 MiB
9119d9
9119d9
The default value should be 16 MiB instead of 8 MiB. Only really old
9119d9
version of upstream QEMU used the 8 MiB as default for vga framebuffer.
9119d9
9119d9
Without this change if you update your libvirt where we introduced the
9119d9
"vgamem" attribute for QXL video device the value will be set to 8 MiB,
9119d9
but previously your guest had 16 MiB because we didn't pass any value to
9119d9
QEMU command line which means QEMU used its own 16 MiB as default.
9119d9
9119d9
This will affect all users with guest's display resolution higher than
9119d9
1920x1080.
9119d9
9119d9
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
9119d9
(cherry picked from commit 0e502466acb84aa05dead1cbe23e6debf58f4ff1)
9119d9
9119d9
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1181052
9119d9
9119d9
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
9119d9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9119d9
---
9119d9
 src/qemu/qemu_command.c | 2 +-
9119d9
 src/qemu/qemu_command.h | 2 ++
9119d9
 src/qemu/qemu_domain.c  | 2 +-
9119d9
 3 files changed, 4 insertions(+), 2 deletions(-)
9119d9
9119d9
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
9119d9
index d3eb43b..db0c324 100644
9119d9
--- a/src/qemu/qemu_command.c
9119d9
+++ b/src/qemu/qemu_command.c
9119d9
@@ -12203,7 +12203,7 @@ qemuParseCommandLine(virCapsPtr qemuCaps,
9119d9
         vid->vram = virDomainVideoDefaultRAM(def, vid->type);
9119d9
         if (vid->type == VIR_DOMAIN_VIDEO_TYPE_QXL) {
9119d9
             vid->ram = virDomainVideoDefaultRAM(def, vid->type);
9119d9
-            vid->vgamem = 8 * 1024;
9119d9
+            vid->vgamem = QEMU_QXL_VGAMEM_DEFAULT;
9119d9
         } else {
9119d9
             vid->ram = 0;
9119d9
             vid->vgamem = 0;
9119d9
diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h
9119d9
index f7d3c2d..6246a85 100644
9119d9
--- a/src/qemu/qemu_command.h
9119d9
+++ b/src/qemu/qemu_command.h
9119d9
@@ -55,6 +55,8 @@
9119d9
 # define QEMU_MIGRATION_PORT_MIN 49152
9119d9
 # define QEMU_MIGRATION_PORT_MAX 49215
9119d9
 
9119d9
+# define QEMU_QXL_VGAMEM_DEFAULT 16 * 1024
9119d9
+
9119d9
 typedef struct _qemuBuildCommandLineCallbacks qemuBuildCommandLineCallbacks;
9119d9
 typedef qemuBuildCommandLineCallbacks *qemuBuildCommandLineCallbacksPtr;
9119d9
 struct _qemuBuildCommandLineCallbacks {
9119d9
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
9119d9
index 58fcd75..0cfc603 100644
9119d9
--- a/src/qemu/qemu_domain.c
9119d9
+++ b/src/qemu/qemu_domain.c
9119d9
@@ -1187,7 +1187,7 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
9119d9
                 goto cleanup;
9119d9
             }
9119d9
         } else {
9119d9
-            dev->data.video->vgamem = 8 * 1024;
9119d9
+            dev->data.video->vgamem = QEMU_QXL_VGAMEM_DEFAULT;
9119d9
         }
9119d9
     }
9119d9
 
9119d9
-- 
9119d9
2.2.1
9119d9