* [PATCH v2] KVM: apic: reuse smp_wmb() in kvm_make_request()
@ 2020-02-07 15:22 linmiaohe
2020-02-07 15:40 ` Sean Christopherson
2020-02-12 11:55 ` Paolo Bonzini
0 siblings, 2 replies; 3+ messages in thread
From: linmiaohe @ 2020-02-07 15:22 UTC (permalink / raw)
To: pbonzini, rkrcmar, sean.j.christopherson, vkuznets, wanpengli,
jmattson, joro, tglx, mingo, bp, hpa
Cc: linmiaohe, kvm, linux-kernel, x86
From: Miaohe Lin <linmiaohe@huawei.com>
kvm_make_request() provides smp_wmb() so pending_events changes are
guaranteed to be visible.
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
v1->v2:
Collected Vitaly's R-b
Use Vitaly's alternative wording
Drop unnecessary comment as suggested by Sean Christopherson
---
arch/x86/kvm/lapic.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index eafc631d305c..afcd30d44cbb 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -1080,9 +1080,6 @@ static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode,
result = 1;
/* assumes that there are only KVM_APIC_INIT/SIPI */
apic->pending_events = (1UL << KVM_APIC_INIT);
- /* make sure pending_events is visible before sending
- * the request */
- smp_wmb();
kvm_make_request(KVM_REQ_EVENT, vcpu);
kvm_vcpu_kick(vcpu);
}
--
2.19.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] KVM: apic: reuse smp_wmb() in kvm_make_request()
2020-02-07 15:22 [PATCH v2] KVM: apic: reuse smp_wmb() in kvm_make_request() linmiaohe
@ 2020-02-07 15:40 ` Sean Christopherson
2020-02-12 11:55 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Sean Christopherson @ 2020-02-07 15:40 UTC (permalink / raw)
To: linmiaohe
Cc: pbonzini, rkrcmar, vkuznets, wanpengli, jmattson, joro, tglx,
mingo, bp, hpa, kvm, linux-kernel, x86
On Fri, Feb 07, 2020 at 11:22:07PM +0800, linmiaohe wrote:
> From: Miaohe Lin <linmiaohe@huawei.com>
>
> kvm_make_request() provides smp_wmb() so pending_events changes are
> guaranteed to be visible.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] KVM: apic: reuse smp_wmb() in kvm_make_request()
2020-02-07 15:22 [PATCH v2] KVM: apic: reuse smp_wmb() in kvm_make_request() linmiaohe
2020-02-07 15:40 ` Sean Christopherson
@ 2020-02-12 11:55 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2020-02-12 11:55 UTC (permalink / raw)
To: linmiaohe, rkrcmar, sean.j.christopherson, vkuznets, wanpengli,
jmattson, joro, tglx, mingo, bp, hpa
Cc: kvm, linux-kernel, x86
On 07/02/20 16:22, linmiaohe wrote:
> From: Miaohe Lin <linmiaohe@huawei.com>
>
> kvm_make_request() provides smp_wmb() so pending_events changes are
> guaranteed to be visible.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
> v1->v2:
> Collected Vitaly's R-b
> Use Vitaly's alternative wording
> Drop unnecessary comment as suggested by Sean Christopherson
> ---
> arch/x86/kvm/lapic.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> index eafc631d305c..afcd30d44cbb 100644
> --- a/arch/x86/kvm/lapic.c
> +++ b/arch/x86/kvm/lapic.c
> @@ -1080,9 +1080,6 @@ static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode,
> result = 1;
> /* assumes that there are only KVM_APIC_INIT/SIPI */
> apic->pending_events = (1UL << KVM_APIC_INIT);
> - /* make sure pending_events is visible before sending
> - * the request */
> - smp_wmb();
> kvm_make_request(KVM_REQ_EVENT, vcpu);
> kvm_vcpu_kick(vcpu);
> }
>
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-12 11:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-07 15:22 [PATCH v2] KVM: apic: reuse smp_wmb() in kvm_make_request() linmiaohe
2020-02-07 15:40 ` Sean Christopherson
2020-02-12 11:55 ` Paolo Bonzini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.