diff options
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 4f0c0b954686..d52dcf0776ea 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) | |||
192 | u16 cid, lid; | 192 | u16 cid, lid; |
193 | u32 ldr, aid; | 193 | u32 ldr, aid; |
194 | 194 | ||
195 | if (!kvm_apic_present(vcpu)) | ||
196 | continue; | ||
197 | |||
195 | aid = kvm_apic_id(apic); | 198 | aid = kvm_apic_id(apic); |
196 | ldr = kvm_apic_get_reg(apic, APIC_LDR); | 199 | ldr = kvm_apic_get_reg(apic, APIC_LDR); |
197 | cid = apic_cluster_id(new, ldr); | 200 | cid = apic_cluster_id(new, ldr); |