Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88c808fd authored by Avi Kivity's avatar Avi Kivity
Browse files

KVM: Protect update_cr8_intercept() when running without an apic



update_cr8_intercept() can be triggered from userspace while there
is no apic present.

Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 95eb84a7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3500,6 +3500,9 @@ static void update_cr8_intercept(struct kvm_vcpu *vcpu)
	if (!kvm_x86_ops->update_cr8_intercept)
		return;

	if (!vcpu->arch.apic)
		return;

	if (!vcpu->arch.apic->vapic_addr)
		max_irr = kvm_lapic_find_highest_irr(vcpu);
	else