summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2020-02-07 16:22:07 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2020-02-12 20:09:41 +0100
commit331ca0f89fc206f06b341f7fe037d7d8662b1b9f (patch)
tree8b8b2555027c099e45abc2968a247f2dcfe2606b /arch/x86
parentKVM: x86: remove duplicated KVM_REQ_EVENT request (diff)
downloadlinux-331ca0f89fc206f06b341f7fe037d7d8662b1b9f.tar.xz
linux-331ca0f89fc206f06b341f7fe037d7d8662b1b9f.zip
KVM: apic: reuse smp_wmb() in kvm_make_request()
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> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kvm/lapic.c3
1 files changed, 0 insertions, 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);
}