diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/lapic.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index dec48bfaddb8..1673940cf9c3 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
@@ -1350,6 +1350,10 @@ void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value) | |||
1350 | return; | 1350 | return; |
1351 | } | 1351 | } |
1352 | 1352 | ||
1353 | if (!kvm_vcpu_is_bsp(apic->vcpu)) | ||
1354 | value &= ~MSR_IA32_APICBASE_BSP; | ||
1355 | vcpu->arch.apic_base = value; | ||
1356 | |||
1353 | /* update jump label if enable bit changes */ | 1357 | /* update jump label if enable bit changes */ |
1354 | if ((vcpu->arch.apic_base ^ value) & MSR_IA32_APICBASE_ENABLE) { | 1358 | if ((vcpu->arch.apic_base ^ value) & MSR_IA32_APICBASE_ENABLE) { |
1355 | if (value & MSR_IA32_APICBASE_ENABLE) | 1359 | if (value & MSR_IA32_APICBASE_ENABLE) |
@@ -1359,10 +1363,6 @@ void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value) | |||
1359 | recalculate_apic_map(vcpu->kvm); | 1363 | recalculate_apic_map(vcpu->kvm); |
1360 | } | 1364 | } |
1361 | 1365 | ||
1362 | if (!kvm_vcpu_is_bsp(apic->vcpu)) | ||
1363 | value &= ~MSR_IA32_APICBASE_BSP; | ||
1364 | |||
1365 | vcpu->arch.apic_base = value; | ||
1366 | if ((old_value ^ value) & X2APIC_ENABLE) { | 1366 | if ((old_value ^ value) & X2APIC_ENABLE) { |
1367 | if (value & X2APIC_ENABLE) { | 1367 | if (value & X2APIC_ENABLE) { |
1368 | u32 id = kvm_apic_id(apic); | 1368 | u32 id = kvm_apic_id(apic); |