[PATCH RESEND] kvm:x86 :remove unnecessary recalculate_apic_map

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In the previous code, the variable sw_apic_disabled is accessed in
recalculate_apic_map. Now it has never accessed sw_apic_disabled,
so it is unnecessary to call recalculate_apic_map when sw_apic_disabled
changes.

Signed-off-by: Peng Hao <peng.hao2@xxxxxxxxxx>
---
 arch/x86/kvm/lapic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index b5cd846..d37a5fe 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -247,8 +247,7 @@ static inline void apic_set_spiv(struct kvm_lapic *apic, u32 val)
 	if (enabled != apic->sw_enabled) {
 		apic->sw_enabled = enabled;
 		if (enabled) {
-			static_key_slow_dec_deferred(&apic_sw_disabled);
-			recalculate_apic_map(apic->vcpu->kvm);
+			static_key_slow_dec_deferred(&apic_sw_disabled);
 		} else
 			static_key_slow_inc(&apic_sw_disabled.key);
 	}
-- 
1.8.3.1




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux