File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2371,8 +2371,10 @@ void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value)
2371
2371
if (((old_value ^ value ) & X2APIC_ENABLE ) && (value & X2APIC_ENABLE ))
2372
2372
kvm_apic_set_x2apic_id (apic , vcpu -> vcpu_id );
2373
2373
2374
- if ((old_value ^ value ) & (MSR_IA32_APICBASE_ENABLE | X2APIC_ENABLE ))
2374
+ if ((old_value ^ value ) & (MSR_IA32_APICBASE_ENABLE | X2APIC_ENABLE )) {
2375
+ kvm_vcpu_update_apicv (vcpu );
2375
2376
static_call_cond (kvm_x86_set_virtual_apic_mode )(vcpu );
2377
+ }
2376
2378
2377
2379
apic -> base_address = apic -> vcpu -> arch .apic_base &
2378
2380
MSR_IA32_APICBASE_BASE ;
Original file line number Diff line number Diff line change @@ -10065,7 +10065,9 @@ void kvm_vcpu_update_apicv(struct kvm_vcpu *vcpu)
10065
10065
down_read (& vcpu -> kvm -> arch .apicv_update_lock );
10066
10066
preempt_disable ();
10067
10067
10068
- activate = kvm_vcpu_apicv_activated (vcpu );
10068
+ /* Do not activate APICV when APIC is disabled */
10069
+ activate = kvm_vcpu_apicv_activated (vcpu ) &&
10070
+ (kvm_get_apic_mode (vcpu ) != LAPIC_MODE_DISABLED );
10069
10071
10070
10072
if (apic -> apicv_active == activate )
10071
10073
goto out ;
You can’t perform that action at this time.
0 commit comments