LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] KVM: x86: check LAPIC presence when building apic_map
@ 2015-01-29 21:33 Radim Krčmář
  0 siblings, 0 replies; only message in thread
From: Radim Krčmář @ 2015-01-29 21:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: kvm, Paolo Bonzini, Nadav Amit

We forgot to re-check LAPIC after splitting the loop in
 173beedc1601 KVM: x86: Software disabled APIC should still deliver NMIs

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
---
 arch/x86/kvm/lapic.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index a688fbffb34e..d1b7d42c3af0 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -193,6 +193,9 @@ static void recalculate_apic_map(struct kvm *kvm)
 		u16 cid, lid;
 		u32 ldr, aid;
 
+		if (!kvm_apic_present(vcpu))
+			continue;
+
 		aid = kvm_apic_id(apic);
 		ldr = kvm_apic_get_reg(apic, APIC_LDR);
 		cid = apic_cluster_id(new, ldr);
-- 
2.2.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-01-29 21:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29 21:33 [PATCH] KVM: x86: check LAPIC presence when building apic_map Radim Krčmář

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).