lkml.org 
[lkml]   [2009]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 18/26] KVM: fix LAPIC timer period overflow
    2.6.31-stable review patch.  If anyone has any objections, please let us know.

    ------------------
    From: Aurelien Jarno <aurelien@aurel32.net>

    commit b2d83cfa3fdefe5c6573d443d099a18dc3a93c5f upstream.

    Don't overflow when computing the 64-bit period from 32-bit registers.

    Fixes sourceforge bug #2826486.

    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
    Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    arch/x86/kvm/lapic.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/arch/x86/kvm/lapic.c
    +++ b/arch/x86/kvm/lapic.c
    @@ -567,7 +567,7 @@ static void start_apic_timer(struct kvm_
    {
    ktime_t now = apic->lapic_timer.timer.base->get_time();

    - apic->lapic_timer.period = apic_get_reg(apic, APIC_TMICT) *
    + apic->lapic_timer.period = (u64)apic_get_reg(apic, APIC_TMICT) *
    APIC_BUS_CYCLE_NS * apic->divide_count;
    atomic_set(&apic->lapic_timer.pending, 0);




    \
     
     \ /
      Last update: 2009-10-10 01:45    [W:0.022 / U:0.608 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site