Skip to content

Commit

Permalink
KVM: x86: check LAPIC presence when building apic_map
Browse files Browse the repository at this point in the history
We forgot to re-check LAPIC after splitting the loop in commit
173beed (KVM: x86: Software disabled APIC should still deliver
NMIs, 2014-11-02).

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Fixes: 173beed
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Radim Krčmář authored and Paolo Bonzini committed Jan 30, 2015
1 parent 02512b2 commit df04d1d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/x86/kvm/lapic.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,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);
Expand Down

0 comments on commit df04d1d

Please sign in to comment.