kvm: x86: remove unnecessary recalculate_apic_map
authorPeng Hao <peng.hao2@zte.com.cn>
Tue, 4 Dec 2018 09:42:50 +0000 (17:42 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 14 Dec 2018 16:59:50 +0000 (17:59 +0100)
In the previous code, the variable apic_sw_disabled influences
recalculate_apic_map. But in "KVM: x86: simplify kvm_apic_map"
(commit: 3b5a5ffa928a3f875b0d5dd284eeb7c322e1688a),
the access to apic_sw_disabled in recalculate_apic_map has been
deleted.

Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c

index c4533d05c214b9e5d776217b5f9e6cec885d31ef..9f089e2e09d02b7585a9b9c1203549c62576112f 100644 (file)
@@ -251,10 +251,9 @@ static inline void apic_set_spiv(struct kvm_lapic *apic, u32 val)
 
        if (enabled != apic->sw_enabled) {
                apic->sw_enabled = enabled;
-               if (enabled) {
+               if (enabled)
                        static_key_slow_dec_deferred(&apic_sw_disabled);
-                       recalculate_apic_map(apic->vcpu->kvm);
-               } else
+               else
                        static_key_slow_inc(&apic_sw_disabled.key);
        }
 }