ia64/xen-unstable

changeset 16252:3980cdd8f879

LAPIC timer accounting fix

Offset emulated local APIC timer so it doesn't tick during guest's
timer related processing. Otherwise, guests using the local APIC for
process accounting can see long sequences of process ticks incorrectly
charged to interrupt processing.

Signed-off-by: Ben Guthro <bguthro@virtualron.com>
Signed-off-by: Gary Grebus <ggrebus@virtualiron.com>
author Keir Fraser <keir@xensource.com>
date Fri Oct 26 10:55:50 2007 +0100 (2007-10-26)
parents 0fbb6ec3ed47
children 1438f3255384
files xen/arch/x86/hvm/vpt.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vpt.c	Fri Oct 26 10:55:32 2007 +0100
     1.2 +++ b/xen/arch/x86/hvm/vpt.c	Fri Oct 26 10:55:50 2007 +0100
     1.3 @@ -307,6 +307,13 @@ void create_periodic_time(
     1.4      pt->period_cycles = (u64)period * cpu_khz / 1000000L;
     1.5      pt->one_shot = one_shot;
     1.6      pt->scheduled = NOW() + period;
     1.7 +    /*
     1.8 +     * Offset LAPIC ticks from other timer ticks. Otherwise guests which use
     1.9 +     * LAPIC ticks for process accounting can see long sequences of process
    1.10 +     * ticks incorrectly accounted to interrupt processing.
    1.11 +     */
    1.12 +    if ( is_lvtt(v, irq) )
    1.13 +        pt->scheduled += period >> 1;
    1.14      pt->cb = cb;
    1.15      pt->priv = data;
    1.16