From 0bfaafa6e28e0f55ee651b228afe514341e5d80c Mon Sep 17 00:00:00 2001 From: Peng Hao Date: Tue, 4 Dec 2018 17:42:50 +0800 Subject: [PATCH] kvm: x86: remove unnecessary recalculate_apic_map MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In the previous code, the variable apic_sw_disabled influences recalculate_apic_map. But in "KVM: x86: simplify kvm_apic_map" (commit: c1b0ce14166ddaa4d64df33ef457a2b3a6fec2b5), the access to apic_sw_disabled in recalculate_apic_map has been deleted. Signed-off-by: Peng Hao Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini --- arch/x86/kvm/lapic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index c4533d05c214b..9f089e2e09d02 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -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); } } -- 2.39.5