ia64/xen-unstable

changeset 18703:6f74549ac4c5

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@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Oct 22 12:08:16 2008 +0100 (2008-10-22)
parents 71c15dfaa12b
children 876618c33914
files xen/arch/x86/hvm/hpet.c xen/arch/x86/hvm/vpt.c
line diff
     1.1 --- a/xen/arch/x86/hvm/hpet.c	Wed Oct 22 12:04:32 2008 +0100
     1.2 +++ b/xen/arch/x86/hvm/hpet.c	Wed Oct 22 12:08:16 2008 +0100
     1.3 @@ -421,11 +421,11 @@ static int hpet_write(
     1.4          {
     1.5              /*
     1.6               * Clamp period to reasonable min/max values:
     1.7 -             *  - minimum is 900us, same as timers controlled by vpt.c
     1.8 +             *  - minimum is 100us, same as timers controlled by vpt.c
     1.9               *  - maximum is to prevent overflow in time_after() calculations
    1.10               */
    1.11 -            if ( hpet_tick_to_ns(h, new_val) < MICROSECS(900) )
    1.12 -                new_val = (MICROSECS(900) << 10) / h->hpet_to_ns_scale;
    1.13 +            if ( hpet_tick_to_ns(h, new_val) < MICROSECS(100) )
    1.14 +                new_val = (MICROSECS(100) << 10) / h->hpet_to_ns_scale;
    1.15              new_val &= (timer_is_32bit(h, tn) ? ~0u : ~0ull) >> 1;
    1.16              h->hpet.period[tn] = new_val;
    1.17          }
     2.1 --- a/xen/arch/x86/hvm/vpt.c	Wed Oct 22 12:04:32 2008 +0100
     2.2 +++ b/xen/arch/x86/hvm/vpt.c	Wed Oct 22 12:08:16 2008 +0100
     2.3 @@ -368,13 +368,13 @@ void create_periodic_time(
     2.4      pt->do_not_freeze = 0;
     2.5      pt->irq_issued = 0;
     2.6  
     2.7 -    /* Periodic timer must be at least 0.9ms. */
     2.8 -    if ( (period < 900000) && period )
     2.9 +    /* Periodic timer must be at least 0.1ms. */
    2.10 +    if ( (period < 100000) && period )
    2.11      {
    2.12          if ( !test_and_set_bool(pt->warned_timeout_too_short) )
    2.13              gdprintk(XENLOG_WARNING, "HVM_PlatformTime: program too "
    2.14                       "small period %"PRIu64"\n", period);
    2.15 -        period = 900000;
    2.16 +        period = 100000;
    2.17      }
    2.18  
    2.19      pt->period = period;