summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/lapic.c
diff options
context:
space:
mode:
authorPeng Hao <peng.hao2@zte.com.cn>2018-12-04 12:42:50 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-12-14 19:59:50 +0300
commiteb1ff0a913ca092ae5a4e7c9277b0a634c645eee (patch)
treed0fae61c20ba2183e9dfc3e7d6f73a5fd28d3182 /arch/x86/kvm/lapic.c
parentb2227ddec1cca6c52f49a19ec1c7a40cd27e0566 (diff)
downloadlinux-eb1ff0a913ca092ae5a4e7c9277b0a634c645eee.tar.xz
kvm: x86: remove unnecessary recalculate_apic_map
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>
Diffstat (limited to 'arch/x86/kvm/lapic.c')
-rw-r--r--arch/x86/kvm/lapic.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index c4533d05c214..9f089e2e09d0 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);
}
}