ia64/xen-unstable

changeset 19214:09a6fa059b37

x86: Clean up vpt-align patch.

Also disable by default if not specified in domain config. Otherwise
the feature would be incorrectly enabled for old saved domain images.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Feb 13 09:48:56 2009 +0000 (2009-02-13)
parents d9480422034b
children 6630f99dfc01
files xen/arch/x86/hvm/hvm.c xen/arch/x86/hvm/vpt.c
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Fri Feb 13 09:43:06 2009 +0000
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Fri Feb 13 09:48:56 2009 +0000
     1.3 @@ -311,7 +311,6 @@ int hvm_domain_initialise(struct domain 
     1.4      hvm_init_guest_time(d);
     1.5  
     1.6      d->arch.hvm_domain.params[HVM_PARAM_HPET_ENABLED] = 1;
     1.7 -    d->arch.hvm_domain.params[HVM_PARAM_VPT_ALIGN]    = 1;
     1.8  
     1.9      hvm_init_cacheattr_region_list(d);
    1.10  
     2.1 --- a/xen/arch/x86/hvm/vpt.c	Fri Feb 13 09:43:06 2009 +0000
     2.2 +++ b/xen/arch/x86/hvm/vpt.c	Fri Feb 13 09:48:56 2009 +0000
     2.3 @@ -384,17 +384,23 @@ void create_periodic_time(
     2.4      pt->period_cycles = (u64)period;
     2.5      pt->one_shot = !period;
     2.6      pt->scheduled = NOW() + delta;
     2.7 -    /*
     2.8 -     * Offset LAPIC ticks from other timer ticks. Otherwise guests which use
     2.9 -     * LAPIC ticks for process accounting can see long sequences of process
    2.10 -     * ticks incorrectly accounted to interrupt processing.
    2.11 -     */
    2.12 +
    2.13      if ( !pt->one_shot )
    2.14      {
    2.15          if ( v->domain->arch.hvm_domain.params[HVM_PARAM_VPT_ALIGN] )
    2.16 +        {
    2.17              pt->scheduled = align_timer(pt->scheduled, pt->period);
    2.18 +        }
    2.19          else if ( pt->source == PTSRC_lapic )
    2.20 +        {
    2.21 +            /*
    2.22 +             * Offset LAPIC ticks from other timer ticks. Otherwise guests
    2.23 +             * which use LAPIC ticks for process accounting can see long
    2.24 +             * sequences of process ticks incorrectly accounted to interrupt
    2.25 +             * processing (seen with RHEL3 guest).
    2.26 +             */
    2.27              pt->scheduled += delta >> 1;
    2.28 +        }
    2.29      }
    2.30  
    2.31      pt->cb = cb;