2018-12-04 01:21:27

by Peng Hao

[permalink] [raw]
Subject: [PATCH V3] 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 <[email protected]>
---
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 fbb0e6d..a11fbf9 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



2018-12-13 19:43:06

by Radim Krčmář

[permalink] [raw]
Subject: Re: [PATCH V3] kvm:x86 :remove unnecessary recalculate_apic_map

2018-12-04 17:42+0800, Peng Hao:
> 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 <[email protected]>
> ---

Reviewed-by: Radim Krčmář <[email protected]>

2018-12-14 10:29:49

by Paolo Bonzini

[permalink] [raw]
Subject: Re: [PATCH V3] kvm:x86 :remove unnecessary recalculate_apic_map

On 13/12/18 20:40, Radim Krčmář wrote:
> Reviewed-by: Radim Krčmář <[email protected]>

Queued, thanks.

Paolo