mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
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>
This commit is contained in:
parent
8feda6f786
commit
b2d83cfa3f
1 changed files with 1 additions and 1 deletions
|
@ -664,7 +664,7 @@ static void start_apic_timer(struct kvm_lapic *apic)
|
|||
{
|
||||
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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue