These patches are "extracted" from a patch-set I made for Xen. Any
xen-specific parts have been removed. The patches do away with the
statically defined VGA_RAM_ SIZE and provides a new -videoram option
to enable setting the amount of video ram available to the VM.
Shrinking default video ram used to 4 Megs (which is all that the
default Cirrus card can use, anyway - previously, there's been a
"waste" of 4 megs with the statically defined 8 Megs), but allowing
users to specify up to 16 Megs of vram, to support the very high
resolutions such as 2560x1600x32 that are available on today's
high-end displays.
The vgabios patch is needed for this to work, both for the variable
size video ram, and to add the new resolutions. The defines for the
high resolution and wide-screen modes were taken from what is already
in qemu-kvm, so getting this into qemu mainline should get qemu/kvm &
xen "in sync" in this regard.
Special thanks to Stefano Stabellini for comments & constructive
criticism, and some save/restore fixes on the Xen version of this
patch-set.
I'll brace myself for reports of how this patch breaks all the non-x86
architectures that qemu emulates... :)
@@ -178,7 +178,7 @@
to store the VM snapshots */
DriveInfo drives_table[MAX_DRIVES+1];
int nb_drives;
-static int vga_ram_size;
+static int vga_ram_size = 4 * 1024 * 1024;
enum vga_retrace_method vga_retrace_method = VGA_RETRACE_DUMB;
DisplayState display_state;
int nographic;