hvm, x86: Allow virtual timer mode to be specified.

In HVM config file:
timer_mode=0 # Default: virtual time is delayed when timer ticks are
             # missed dur to preemption
timer_mode=1 # Virtual time always equals wall time, even while missed
             # ticks are pending

From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
Keir Fraser committed 2007-10-26 09:56:54 +01:00
1 parent 5afede5ce6
commit 617d4311ef
12 files changed
+91 -32

No files matched your search

+1 -1
View File
@@ -127,7 +127,7 @@ XENAPI_PLATFORM_CFG = [ 'acpi', 'apic', 'boot', 'device_model', 'display',
'fda', 'fdb', 'keymap', 'isa', 'localtime', 'monitor',
'nographic', 'pae', 'rtc_timeoffset', 'serial', 'sdl',
'soundhw','stdvga', 'usb', 'usbdevice', 'vnc',
'vncconsole', 'vncdisplay', 'vnclisten',
'vncconsole', 'vncdisplay', 'vnclisten', 'timer_mode',
'vncpasswd', 'vncunused', 'xauthority', 'pci', 'vhpt']
# Xen API console 'other_config' keys.
+1
View File
@@ -46,6 +46,7 @@ HVM_PARAM_BUFIOREQ_PFN = 6
HVM_PARAM_NVRAM_FD = 7
HVM_PARAM_VHPT_SIZE = 8
HVM_PARAM_BUFPIOREQ_PFN = 9
HVM_PARAM_TIMER_MODE = 10
restart_modes = [
"restart",
+5
View File
@@ -1596,6 +1596,11 @@ class XendDomainInfo:
self._recreateDom()
# Set timer configration of domain
if hvm:
xc.hvm_set_param(self.domid, HVM_PARAM_TIMER_MODE,
long(self.info["platform"].get("timer_mode")))
# Set maximum number of vcpus in domain
xc.domain_max_vcpus(self.domid, int(self.info['VCPUs_max']))
+6 -1
View File
@@ -194,6 +194,11 @@ gopts.var('pae', val='PAE',
fn=set_int, default=1,
use="Disable or enable PAE of HVM domain.")
gopts.var('timer_mode', val='TIMER_MODE',
fn=set_int, default=0,
use="""Timer mode (0=delay virtual time when ticks are missed;
1=virtual time is always wallclock time.""")
gopts.var('acpi', val='ACPI',
fn=set_int, default=1,
use="Disable or enable ACPI of HVM domain.")
@@ -724,7 +729,7 @@ def configure_vifs(config_devs, vals):
def configure_hvm(config_image, vals):
"""Create the config for HVM devices.
"""
args = [ 'device_model', 'pae', 'vcpus', 'boot', 'fda', 'fdb',
args = [ 'device_model', 'pae', 'vcpus', 'boot', 'fda', 'fdb', 'timer_mode',
'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'soundhw',
'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'vnclisten',
'sdl', 'display', 'xauthority', 'rtc_timeoffset', 'monitor',
+1 -1
View File
@@ -818,7 +818,7 @@ class sxp2xml:
def extract_platform(self, image, document):
platform_keys = ['acpi', 'apic', 'pae', 'vhpt']
platform_keys = ['acpi', 'apic', 'pae', 'vhpt', 'timer_mode']
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.