diff -r 6741bbc08b25 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py	Mon Feb 04 14:32:26 2008 +0000
+++ b/tools/python/xen/xend/XendConfig.py	Thu Feb 07 09:27:13 2008 -0700
@@ -124,7 +124,7 @@ XENAPI_PLATFORM_CFG = [ 'acpi', 'apic', 
 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',
+                        'soundhw','stdvga', 'usb', 'usbdevice', 'vhpet', 'vnc',
                         'vncconsole', 'vncdisplay', 'vnclisten', 'timer_mode',
                         'vncpasswd', 'vncunused', 'xauthority']
 
diff -r 6741bbc08b25 tools/python/xen/xend/XendConstants.py
--- a/tools/python/xen/xend/XendConstants.py	Mon Feb 04 14:32:26 2008 +0000
+++ b/tools/python/xen/xend/XendConstants.py	Thu Feb 07 09:27:13 2008 -0700
@@ -44,6 +44,7 @@ HVM_PARAM_IOREQ_PFN    = 5
 HVM_PARAM_IOREQ_PFN    = 5
 HVM_PARAM_BUFIOREQ_PFN = 6
 HVM_PARAM_TIMER_MODE   = 10
+HVM_PARAM_VHPET        = 11
 
 restart_modes = [
     "restart",
diff -r 6741bbc08b25 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py	Mon Feb 04 14:32:26 2008 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py	Thu Feb 07 09:27:13 2008 -0700
@@ -1547,6 +1547,12 @@ class XendDomainInfo:
         if hvm and timer_mode is not None:
             xc.hvm_set_param(self.domid, HVM_PARAM_TIMER_MODE,
                              long(timer_mode))
+
+        # Optionally enable virtual HPET
+        vhpet = self.info["platform"].get("vhpet")
+        if hvm and vhpet is not None:
+            xc.hvm_set_param(self.domid, HVM_PARAM_VHPET,
+                             long(vhpet))
 
         # Set maximum number of vcpus in domain
         xc.domain_max_vcpus(self.domid, int(self.info['VCPUs_max']))
diff -r 6741bbc08b25 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py	Mon Feb 04 14:32:26 2008 +0000
+++ b/tools/python/xen/xm/create.py	Thu Feb 07 09:27:13 2008 -0700
@@ -193,6 +193,10 @@ gopts.var('pae', val='PAE',
 gopts.var('pae', val='PAE',
           fn=set_int, default=1,
           use="Disable or enable PAE of HVM domain.")
+
+gopts.var('vhpet', val='VHPET',
+          fn=set_int, default=0,
+          use="Enable virtual high-precision event timer.")
 
 gopts.var('timer_mode', val='TIMER_MODE',
           fn=set_int, default=0,
@@ -731,7 +735,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' ]
+             'vhpet', 'acpi', 'apic', 'usb', 'usbdevice', 'keymap' ]
     for a in args:
         if a in vals.__dict__ and vals.__dict__[a] is not None:
             config_image.append([a, vals.__dict__[a]])
diff -r 6741bbc08b25 tools/python/xen/xm/xenapi_create.py
--- a/tools/python/xen/xm/xenapi_create.py	Mon Feb 04 14:32:26 2008 +0000
+++ b/tools/python/xen/xm/xenapi_create.py	Thu Feb 07 09:27:13 2008 -0700
@@ -755,7 +755,7 @@ class sxp2xml:
 
 
     def extract_platform(self, image, document):
-        platform_keys = ['acpi', 'apic', 'pae', 'timer_mode']
+        platform_keys = ['acpi', 'apic', 'pae', 'timer_mode', 'vhpet']
 
         def extract_platform_key(key):
             platform = document.createElement("platform")
diff -r 6741bbc08b25 xen/arch/x86/hvm/hpet.c
--- a/xen/arch/x86/hvm/hpet.c	Mon Feb 04 14:32:26 2008 +0000
+++ b/xen/arch/x86/hvm/hpet.c	Thu Feb 07 09:27:13 2008 -0700
@@ -328,6 +328,8 @@ static void hpet_write(
 
 static int hpet_range(struct vcpu *v, unsigned long addr)
 {
+    if (!(v->domain->arch.hvm_domain.params[HVM_PARAM_VHPET]))
+        return 0;
     return ((addr >= HPET_BASE_ADDRESS) &&
             (addr < (HPET_BASE_ADDRESS + HPET_MMAP_SIZE)));
 }
diff -r 6741bbc08b25 xen/include/public/hvm/params.h
--- a/xen/include/public/hvm/params.h	Mon Feb 04 14:32:26 2008 +0000
+++ b/xen/include/public/hvm/params.h	Thu Feb 07 09:27:13 2008 -0700
@@ -79,6 +79,12 @@
 #define HVMPTM_no_missed_ticks_pending   2
 #define HVMPTM_one_missed_tick_pending   3
 
-#define HVM_NR_PARAMS          11
+/*
+ * Enable virtual HPET (high-precision event timer) (x86-only)
+ *  0=disabled, 1-enabled
+ */
+#define HVM_PARAM_VHPET 11
+
+#define HVM_NR_PARAMS          12
 
 #endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */
