diff options
author | Radim Krčmář <rkrcmar@redhat.com> | 2015-01-29 22:33:35 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-01-30 12:28:31 +0100 |
commit | df04d1d191a5fea628981067e7cb7da33b246e89 (patch) | |
tree | 1acf4015e42260d47ade1fb12102b8d5fa83eb40 /arch/x86/kvm/lapic.c | |
parent | 02512b2bd63385d1f34f6956860dedbfc9ac20d7 (diff) | |
download | op-kernel-dev-df04d1d191a5fea628981067e7cb7da33b246e89.zip op-kernel-dev-df04d1d191a5fea628981067e7cb7da33b246e89.tar.gz |
KVM: x86: check LAPIC presence when building apic_map
We forgot to re-check LAPIC after splitting the loop in commit
173beedc1601 (KVM: x86: Software disabled APIC should still deliver
NMIs, 2014-11-02).
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Fixes: 173beedc1601f51dae9d579aa7a414c5aa8f700b
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/lapic.c')
-rw-r--r-- | arch/x86/kvm/lapic.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 4f0c0b9..d52dcf0 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -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); |