x86, hvm: stdvga improvements

* enables linear framebuffer and VBE 3.0 extensions.
* add a number of new resolutions, up to 2560x1600, and including
* widescreen modes common to modern displays.
* Introduce configurable video ram size through the "videoram" config
* file option, shrinking default video ram used to 4 Megs (thus
* eliminating 4 wasted megs/VM that have been the case until now), but
* allowing users to specify up to 16 Megs of vram, to support the
* extreme high resolutions such as 2560x1600x32.

Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
This commit is contained in:
Keir Fraser committed 2009-01-14 10:51:58 +00:00
1 parent 248ba473c4
commit a390e6128b
8 files changed
+94 -59

No files matched your search

+1
View File
@@ -149,6 +149,7 @@ XENAPI_PLATFORM_CFG_TYPES = {
'opengl': int,
'soundhw': str,
'stdvga': int,
'videoram': int,
'usb': int,
'usbdevice': str,
'hpet': int,
+9 -4
View File
@@ -265,6 +265,10 @@ class ImageHandler:
ret.append('-nographic')
return ret
vram = str(vmConfig['platform'].get('videoram',4))
ret.append('-videoram')
ret.append(vram)
vnc_config = {}
has_vnc = int(vmConfig['platform'].get('vnc', 0)) != 0
has_sdl = int(vmConfig['platform'].get('sdl', 0)) != 0
@@ -833,6 +837,7 @@ class IA64_HVM_ImageHandler(HVMImageHandler):
def configure(self, vmConfig):
HVMImageHandler.configure(self, vmConfig)
self.vhpt = int(vmConfig['platform'].get('vhpt', 0))
self.vramsize = int(vmConfig['platform'].get('videoram',4)) * 1024
def buildDomain(self):
xc.nvram_init(self.vm.getName(), self.vm.getDomid())
@@ -847,8 +852,8 @@ class IA64_HVM_ImageHandler(HVMImageHandler):
# buffer io page, buffer pio page and memmap info page
extra_pages = 1024 + 5
mem_kb += extra_pages * page_kb
# Add 8 MiB overhead for QEMU's video RAM.
return mem_kb + 8192
mem_kb += self.vramsize
return mem_kb
def getRequiredInitialReservation(self):
return self.vm.getMemoryTarget()
@@ -882,6 +887,7 @@ class X86_HVM_ImageHandler(HVMImageHandler):
def configure(self, vmConfig):
HVMImageHandler.configure(self, vmConfig)
self.pae = int(vmConfig['platform'].get('pae', 0))
self.vramsize = int(vmConfig['platform'].get('videoram',4)) * 1024
def buildDomain(self):
xc.hvm_set_param(self.vm.getDomid(), HVM_PARAM_PAE_ENABLED, self.pae)
@@ -890,8 +896,7 @@ class X86_HVM_ImageHandler(HVMImageHandler):
return rc
def getRequiredAvailableMemory(self, mem_kb):
# Add 8 MiB overhead for QEMU's video RAM.
return mem_kb + 8192
return mem_kb + self.vramsize
def getRequiredInitialReservation(self):
return self.vm.getMemoryTarget()
+4 -4
View File
@@ -526,9 +526,9 @@ gopts.var('vncunused', val='',
use="""Try to find an unused port for the VNC server.
Only valid when vnc=1.""")
gopts.var('videoram', val='',
fn=set_value, default=None,
use="""Maximum amount of videoram PV guest can allocate
gopts.var('videoram', val='MEMORY',
fn=set_int, default=4,
use="""Maximum amount of videoram a guest can allocate
for frame buffer.""")
gopts.var('sdl', val='',
@@ -884,7 +884,7 @@ def configure_hvm(config_image, vals):
"""Create the config for HVM devices.
"""
args = [ 'device_model', 'pae', 'vcpus', 'boot', 'fda', 'fdb', 'timer_mode',
'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'soundhw',
'localtime', 'serial', 'stdvga', 'videoram', 'isa', 'nographic', 'soundhw',
'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'vnclisten',
'sdl', 'display', 'xauthority', 'rtc_timeoffset', 'monitor',
'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci', 'hpet',
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.