]> git.proxmox.com Git - mirror_qemu.git/commitdiff
cirrus: switch to 4 MB video memory by default
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 14 Mar 2017 12:28:34 +0000 (13:28 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 16 Mar 2017 07:58:15 +0000 (08:58 +0100)
Quoting cirrus source code:
   Follow real hardware, cirrus card emulated has 4 MB video memory.
   Also accept 8 MB/16 MB for backward compatibility.

So just use 4MB by default.  We decided to leave that at 8MB by default
a while ago, for live migration compatibility reasons.  But we have
compat properties to handle that, so that isn't a compeling reason.

This also removes some sanity check inconsistencies in the cirrus code.
Some places check against the allocated video memory, some places check
against the 4MB physical hardware has.  Guest code can trigger asserts
because of that.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 1489494514-15606-1-git-send-email-kraxel@redhat.com

hw/display/cirrus_vga.c
include/hw/compat.h

index c90a4a3958d2223f4bd51bd320e917dc002032c0..6ffe64fdcc0033f7e99ec02ce45a8744007f727e 100644 (file)
@@ -3023,7 +3023,7 @@ static void isa_cirrus_vga_realizefn(DeviceState *dev, Error **errp)
 
 static Property isa_cirrus_vga_properties[] = {
     DEFINE_PROP_UINT32("vgamem_mb", struct ISACirrusVGAState,
-                       cirrus_vga.vga.vram_size_mb, 8),
+                       cirrus_vga.vga.vram_size_mb, 4),
     DEFINE_PROP_END_OF_LIST(),
 };
 
@@ -3092,7 +3092,7 @@ static void pci_cirrus_vga_realize(PCIDevice *dev, Error **errp)
 
 static Property pci_vga_cirrus_properties[] = {
     DEFINE_PROP_UINT32("vgamem_mb", struct PCICirrusVGAState,
-                       cirrus_vga.vga.vram_size_mb, 8),
+                       cirrus_vga.vga.vram_size_mb, 4),
     DEFINE_PROP_END_OF_LIST(),
 };
 
index b7db43803cf54f19aff3b37f66546059209b95f8..b7e0e9f191f81631e68bc7538bba7a025984a7cd 100644 (file)
         .driver   = "pci-bridge",\
         .property = "shpc",\
         .value    = "on",\
+    },{\
+        .driver   = "cirrus-vga",\
+        .property = "vgamem_mb",\
+        .value    = "8",\
+    },{\
+        .driver   = "isa-cirrus-vga",\
+        .property = "vgamem_mb",\
+        .value    = "8",\
     },
 
 #define HW_COMPAT_2_7 \