diff -r d26b1b777fde tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py	Wed Feb 06 10:06:35 2008 +0000
+++ b/tools/python/xen/xend/XendConfig.py	Thu Feb 07 13:32:26 2008 -0700
@@ -127,7 +127,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', 'hpet', 'vnc',
                         'vncconsole', 'vncdisplay', 'vnclisten', 'timer_mode',
                         'vncpasswd', 'vncunused', 'xauthority', 'pci', 'vhpt',
                         'guest_os_type' ]
diff -r d26b1b777fde tools/python/xen/xend/XendConstants.py
--- a/tools/python/xen/xend/XendConstants.py	Wed Feb 06 10:06:35 2008 +0000
+++ b/tools/python/xen/xend/XendConstants.py	Thu Feb 07 13:32:26 2008 -0700
@@ -47,6 +47,7 @@ HVM_PARAM_VHPT_SIZE    = 8
 HVM_PARAM_VHPT_SIZE    = 8
 HVM_PARAM_BUFPIOREQ_PFN = 9
 HVM_PARAM_TIMER_MODE   = 10
+HVM_PARAM_HPET         = 11
 
 restart_modes = [
     "restart",
diff -r d26b1b777fde tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py	Wed Feb 06 10:06:35 2008 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py	Thu Feb 07 13:32:26 2008 -0700
@@ -1659,6 +1659,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
+        hpet = self.info["platform"].get("hpet")
+        if hvm and hpet is not None:
+            xc.hvm_set_param(self.domid, HVM_PARAM_HPET,
+                             long(hpet))
 
         # Set maximum number of vcpus in domain
         xc.domain_max_vcpus(self.domid, int(self.info['VCPUs_max']))
diff -r d26b1b777fde tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py	Wed Feb 06 10:06:35 2008 +0000
+++ b/tools/python/xen/xm/create.py	Thu Feb 07 13:32:26 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('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,
@@ -723,7 +727,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']
 
     for a in args:
diff -r d26b1b777fde tools/python/xen/xm/xenapi_create.py
--- a/tools/python/xen/xm/xenapi_create.py	Wed Feb 06 10:06:35 2008 +0000
+++ b/tools/python/xen/xm/xenapi_create.py	Thu Feb 07 13:32:26 2008 -0700
@@ -818,7 +818,7 @@ class sxp2xml:
 
 
     def extract_platform(self, image, document):
-        platform_keys = ['acpi', 'apic', 'pae', 'vhpt', 'timer_mode']
+        platform_keys = ['acpi', 'apic', 'pae', 'vhpt', 'timer_mode', 'hpet']
 
         def extract_platform_key(key):
             platform = document.createElement("platform")
diff -r d26b1b777fde xen/arch/x86/hvm/hpet.c
--- a/xen/arch/x86/hvm/hpet.c	Wed Feb 06 10:06:35 2008 +0000
+++ b/xen/arch/x86/hvm/hpet.c	Thu Feb 07 13:32:26 2008 -0700
@@ -353,6 +353,8 @@ static void hpet_write(
 
 static int hpet_range(struct vcpu *v, unsigned long addr)
 {
+    if (!(v->domain->arch.hvm_domain.params[HVM_PARAM_HPET]))
+        return 0;
     return ((addr >= HPET_BASE_ADDRESS) &&
             (addr < (HPET_BASE_ADDRESS + HPET_MMAP_SIZE)));
 }
diff -r d26b1b777fde xen/include/public/hvm/params.h
--- a/xen/include/public/hvm/params.h	Wed Feb 06 10:06:35 2008 +0000
+++ b/xen/include/public/hvm/params.h	Thu Feb 07 13:32:26 2008 -0700
@@ -81,6 +81,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_HPET 11
+
+#define HVM_NR_PARAMS          12
 
 #endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */
