aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/vpt.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-02-13 09:48:56 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-02-13 09:48:56 +0000
commitb0786556d3fda06613a2bb42e75d8221231ab479 (patch)
treed6e050397a143f07771dfa33b436c622583ea5e8 /xen/arch/x86/hvm/vpt.c
parent0eecf73be6e7304f382dd16491cd2917f5135bae (diff)
downloadxen-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.c16
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;