[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86, hvm: Allow 100us periodic virtual timers



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1224673696 -3600
# Node ID 6f74549ac4c5b9a83187994e6c7b149961b176da
# Parent  71c15dfaa12b420383e163e61beb93054172dfdc
x86, hvm: Allow 100us periodic virtual timers

Adjust vpt and hpet minimum period (for timers) from 900us to 100us to
be able to pass Windows 2008 compatibility tests.

Signed-off-by: Peter Johnston <peter.johnston@xxxxxxxxxx>
---
 xen/arch/x86/hvm/hpet.c |    6 +++---
 xen/arch/x86/hvm/vpt.c  |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff -r 71c15dfaa12b -r 6f74549ac4c5 xen/arch/x86/hvm/hpet.c
--- a/xen/arch/x86/hvm/hpet.c   Wed Oct 22 12:04:32 2008 +0100
+++ b/xen/arch/x86/hvm/hpet.c   Wed Oct 22 12:08:16 2008 +0100
@@ -421,11 +421,11 @@ static int hpet_write(
         {
             /*
              * Clamp period to reasonable min/max values:
-             *  - minimum is 900us, same as timers controlled by vpt.c
+             *  - minimum is 100us, same as timers controlled by vpt.c
              *  - maximum is to prevent overflow in time_after() calculations
              */
-            if ( hpet_tick_to_ns(h, new_val) < MICROSECS(900) )
-                new_val = (MICROSECS(900) << 10) / h->hpet_to_ns_scale;
+            if ( hpet_tick_to_ns(h, new_val) < MICROSECS(100) )
+                new_val = (MICROSECS(100) << 10) / h->hpet_to_ns_scale;
             new_val &= (timer_is_32bit(h, tn) ? ~0u : ~0ull) >> 1;
             h->hpet.period[tn] = new_val;
         }
diff -r 71c15dfaa12b -r 6f74549ac4c5 xen/arch/x86/hvm/vpt.c
--- a/xen/arch/x86/hvm/vpt.c    Wed Oct 22 12:04:32 2008 +0100
+++ b/xen/arch/x86/hvm/vpt.c    Wed Oct 22 12:08:16 2008 +0100
@@ -368,13 +368,13 @@ void create_periodic_time(
     pt->do_not_freeze = 0;
     pt->irq_issued = 0;
 
-    /* Periodic timer must be at least 0.9ms. */
-    if ( (period < 900000) && period )
+    /* Periodic timer must be at least 0.1ms. */
+    if ( (period < 100000) && period )
     {
         if ( !test_and_set_bool(pt->warned_timeout_too_short) )
             gdprintk(XENLOG_WARNING, "HVM_PlatformTime: program too "
                      "small period %"PRIu64"\n", period);
-        period = 900000;
+        period = 100000;
     }
 
     pt->period = period;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.