diff options
| author | Aurelien Jarno <aurelien@aurel32.net> | 2009-09-25 05:09:37 -0400 |
|---|---|---|
| committer | Avi Kivity <avi@redhat.com> | 2009-10-04 07:57:23 -0400 |
| commit | b2d83cfa3fdefe5c6573d443d099a18dc3a93c5f (patch) | |
| tree | 4833580d843369a6a16a317a93114c512bc6504d /arch | |
| parent | 8feda6f786fc44f5f8b5cf88e3b6c03514f5be93 (diff) | |
KVM: fix LAPIC timer period overflow
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>
Cc: stable@kernel.org
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/x86/kvm/lapic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 1ae5ceba7eb2..7024224f0fc8 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
| @@ -664,7 +664,7 @@ static void start_apic_timer(struct kvm_lapic *apic) | |||
| 664 | { | 664 | { |
| 665 | ktime_t now = apic->lapic_timer.timer.base->get_time(); | 665 | ktime_t now = apic->lapic_timer.timer.base->get_time(); |
| 666 | 666 | ||
| 667 | apic->lapic_timer.period = apic_get_reg(apic, APIC_TMICT) * | 667 | apic->lapic_timer.period = (u64)apic_get_reg(apic, APIC_TMICT) * |
| 668 | APIC_BUS_CYCLE_NS * apic->divide_count; | 668 | APIC_BUS_CYCLE_NS * apic->divide_count; |
| 669 | atomic_set(&apic->lapic_timer.pending, 0); | 669 | atomic_set(&apic->lapic_timer.pending, 0); |
| 670 | 670 | ||
