diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-02-13 09:48:56 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-02-13 09:48:56 +0000 |
commit | b0786556d3fda06613a2bb42e75d8221231ab479 (patch) | |
tree | d6e050397a143f07771dfa33b436c622583ea5e8 /xen/arch/x86/hvm/vpt.c | |
parent | 0eecf73be6e7304f382dd16491cd2917f5135bae (diff) | |
download | xen-b0786556d3fda06613a2bb42e75d8221231ab479.tar.gz xen-b0786556d3fda06613a2bb42e75d8221231ab479.tar.bz2 xen-b0786556d3fda06613a2bb42e75d8221231ab479.zip |
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>
Diffstat (limited to 'xen/arch/x86/hvm/vpt.c')
-rw-r--r-- | xen/arch/x86/hvm/vpt.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c index 33f2400a0e..fe4ec99129 100644 --- a/xen/arch/x86/hvm/vpt.c +++ b/xen/arch/x86/hvm/vpt.c @@ -384,17 +384,23 @@ void create_periodic_time( pt->period_cycles = (u64)period; pt->one_shot = !period; pt->scheduled = NOW() + delta; - /* - * Offset LAPIC ticks from other timer ticks. Otherwise guests which use - * LAPIC ticks for process accounting can see long sequences of process - * ticks incorrectly accounted to interrupt processing. - */ + if ( !pt->one_shot ) { if ( v->domain->arch.hvm_domain.params[HVM_PARAM_VPT_ALIGN] ) + { pt->scheduled = align_timer(pt->scheduled, pt->period); + } else if ( pt->source == PTSRC_lapic ) + { + /* + * Offset LAPIC ticks from other timer ticks. Otherwise guests + * which use LAPIC ticks for process accounting can see long + * sequences of process ticks incorrectly accounted to interrupt + * processing (seen with RHEL3 guest). + */ pt->scheduled += delta >> 1; + } } pt->cb = cb; |