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

KVM: x86: check LAPIC presence when building apic_map

We forgot to re-check LAPIC after splitting the loop in commit
173beedc (KVM: x86: Software disabled APIC should still deliver
NMIs, 2014-11-02).
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
Fixes: 173beedcSigned-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 02512b2b
...@@ -192,6 +192,9 @@ static void recalculate_apic_map(struct kvm *kvm) ...@@ -192,6 +192,9 @@ static void recalculate_apic_map(struct kvm *kvm)
u16 cid, lid; u16 cid, lid;
u32 ldr, aid; u32 ldr, aid;
if (!kvm_apic_present(vcpu))
continue;
aid = kvm_apic_id(apic); aid = kvm_apic_id(apic);
ldr = kvm_apic_get_reg(apic, APIC_LDR); ldr = kvm_apic_get_reg(apic, APIC_LDR);
cid = apic_cluster_id(new, ldr); cid = apic_cluster_id(new, ldr);
......
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