KVM: x86: really disarm lapic timer when clearing TMICT
preemption timer only looks at tscdeadline and could inject already disarmed timer. Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Reviewed-by: Wanpeng Li <wanpeng.li@hotmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Родитель
86bbc1e6d7
Коммит
5d74a69993
|
@ -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_BUS_CYCLE_NS * apic->divide_count;
|
||||
|
||||
if (!apic->lapic_timer.period)
|
||||
if (!apic->lapic_timer.period) {
|
||||
apic->lapic_timer.tscdeadline = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
limit_periodic_timer_frequency(apic);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче