Skip to content

Commit d2286ba

Browse files
Wanpeng Libonzini
authored andcommitted
KVM: LAPIC: Prevent setting the tscdeadline timer if the lapic is hw disabled
Prevent setting the tscdeadline timer if the lapic is hw disabled. Fixes: bce87cc (KVM: x86: consolidate different ways to test for in-kernel LAPIC) Cc: <[email protected]> Signed-off-by: Wanpeng Li <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent d741dca commit d2286ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/lapic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2195,7 +2195,7 @@ void kvm_set_lapic_tscdeadline_msr(struct kvm_vcpu *vcpu, u64 data)
21952195
{
21962196
struct kvm_lapic *apic = vcpu->arch.apic;
21972197

2198-
if (!lapic_in_kernel(vcpu) || apic_lvtt_oneshot(apic) ||
2198+
if (!kvm_apic_present(vcpu) || apic_lvtt_oneshot(apic) ||
21992199
apic_lvtt_period(apic))
22002200
return;
22012201

0 commit comments

Comments
 (0)