mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2]  kvm:x86 :remove unnecessary recalculate_apic_map
@ 2018-10-16  9:12 Peng Hao
  2018-10-16 12:49 ` Wei Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Hao @ 2018-10-16  9:12 UTC (permalink / raw)
  To: pbonzini, rkrcmar, tglx, x86, hpa, mingo; +Cc: linux-kernel, kvm, Peng Hao

In the previous code, the variable sw_apic_disabled influences
recalculate_apic_map. But in "KVM: x86: simplify kvm_apic_map"
(commit:3b5a5ffa928a3f875b0d5dd284eeb7c322e1688a),
the access to sw_apic_disabled in recalculate_apic_map has been
deleted.

Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
---
 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 70dcb55..0380e37 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -246,10 +246,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);
 	}
 }
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2]  kvm:x86 :remove unnecessary recalculate_apic_map
  2018-10-16  9:12 [PATCH v2] kvm:x86 :remove unnecessary recalculate_apic_map Peng Hao
@ 2018-10-16 12:49 ` Wei Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Wei Yang @ 2018-10-16 12:49 UTC (permalink / raw)
  To: Peng Hao; +Cc: pbonzini, rkrcmar, tglx, x86, hpa, mingo, linux-kernel, kvm

On Tue, Oct 16, 2018 at 05:12:30PM +0800, Peng Hao wrote:
>In the previous code, the variable sw_apic_disabled influences
>recalculate_apic_map. But in "KVM: x86: simplify kvm_apic_map"
>(commit:3b5a5ffa928a3f875b0d5dd284eeb7c322e1688a),
>the access to sw_apic_disabled in recalculate_apic_map has been
>deleted.

s/sw_apic_disabled/apic_sw_disabled/ ?

>
>Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
>---
> 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 70dcb55..0380e37 100644
>--- a/arch/x86/kvm/lapic.c
>+++ b/arch/x86/kvm/lapic.c
>@@ -246,10 +246,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);
> 	}
> }
>-- 
>1.8.3.1

-- 
Wei Yang
Help you, Help me

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-16 12:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-16  9:12 [PATCH v2] kvm:x86 :remove unnecessary recalculate_apic_map Peng Hao
2018-10-16 12:49 ` Wei Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®