Commit 5d74a699 authored by Radim Krčmář's avatar Radim Krčmář Committed by Paolo Bonzini

KVM: x86: really disarm lapic timer when clearing TMICT

preemption timer only looks at tscdeadline and could inject already
disarmed timer.
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
Reviewed-by: default avatarWanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 86bbc1e6
...@@ -1489,8 +1489,10 @@ static bool set_target_expiration(struct kvm_lapic *apic) ...@@ -1489,8 +1489,10 @@ static bool set_target_expiration(struct kvm_lapic *apic)
apic->lapic_timer.period = (u64)kvm_lapic_get_reg(apic, APIC_TMICT) apic->lapic_timer.period = (u64)kvm_lapic_get_reg(apic, APIC_TMICT)
* APIC_BUS_CYCLE_NS * apic->divide_count; * APIC_BUS_CYCLE_NS * apic->divide_count;
if (!apic->lapic_timer.period) if (!apic->lapic_timer.period) {
apic->lapic_timer.tscdeadline = 0;
return false; return false;
}
limit_periodic_timer_frequency(apic); limit_periodic_timer_frequency(apic);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment