x86 hvm: Allow HPET to be configured as a per-domain config option.

A new platform variable 'hpet' is added, which defaults to 0 for new
guests (that is, hpet disabled). Default is off (no hpet) because
hpet is currently less accurate in keeping time than PIT (because no
timer_mode adjustments).

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
Keir Fraser committed 2008-02-11 14:45:29 +00:00
1 parent 81375c4b06
commit 3f8e22de79
11 files changed
+496 -454

No files matched your search

+1 -1
View File
@@ -127,7 +127,7 @@ LEGACY_CFG_TO_XENAPI_CFG = reverse_dict(XENAPI_CFG_TO_LEGACY_CFG)
XENAPI_PLATFORM_CFG = [ 'acpi', 'apic', 'boot', 'device_model', 'loader', 'display',
'fda', 'fdb', 'keymap', 'isa', 'localtime', 'monitor',
'nographic', 'pae', 'rtc_timeoffset', 'serial', 'sdl',
'soundhw','stdvga', 'usb', 'usbdevice', 'vnc',
'soundhw','stdvga', 'usb', 'usbdevice', 'hpet', 'vnc',
'vncconsole', 'vncdisplay', 'vnclisten', 'timer_mode',
'vncpasswd', 'vncunused', 'xauthority', 'pci', 'vhpt',
'guest_os_type', 'hap']
+1
View File
@@ -47,6 +47,7 @@ HVM_PARAM_NVRAM_FD = 7
HVM_PARAM_VHPT_SIZE = 8
HVM_PARAM_BUFPIOREQ_PFN = 9
HVM_PARAM_TIMER_MODE = 10
HVM_PARAM_HPET_ENABLED = 11
restart_modes = [
"restart",
+6
View File
@@ -1692,6 +1692,12 @@ class XendDomainInfo:
xc.hvm_set_param(self.domid, HVM_PARAM_TIMER_MODE,
long(timer_mode))
# Optionally enable virtual HPET
hpet = self.info["platform"].get("hpet")
if hvm and hpet is not None:
xc.hvm_set_param(self.domid, HVM_PARAM_HPET_ENABLED,
long(hpet))
# Set maximum number of vcpus in domain
xc.domain_max_vcpus(self.domid, int(self.info['VCPUs_max']))
+5 -1
View File
@@ -198,6 +198,10 @@ gopts.var('pae', val='PAE',
fn=set_int, default=1,
use="Disable or enable PAE of HVM domain.")
gopts.var('hpet', val='HPET',
fn=set_int, default=0,
use="Enable virtual high-precision event timer.")
gopts.var('timer_mode', val='TIMER_MODE',
fn=set_int, default=0,
use="""Timer mode (0=delay virtual time when ticks are missed;
@@ -740,7 +744,7 @@ def configure_hvm(config_image, vals):
'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'soundhw',
'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'vnclisten',
'sdl', 'display', 'xauthority', 'rtc_timeoffset', 'monitor',
'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci',
'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci', 'hpet',
'guest_os_type', 'hap']
for a in args:
+2 -1
View File
@@ -818,7 +818,8 @@ class sxp2xml:
def extract_platform(self, image, document):
platform_keys = ['acpi', 'apic', 'pae', 'vhpt', 'timer_mode', 'hap']
platform_keys = ['acpi', 'apic', 'pae', 'vhpt', 'timer_mode',
'hap', 'hpet']
def extract_platform_key(key):
platform = document.createElement("platform")
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.