Skip to content

Commit

Permalink
KVM: apic: reuse smp_wmb() in kvm_make_request()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Miaohe Lin authored and Paolo Bonzini committed Feb 12, 2020
1 parent 2079644 commit 331ca0f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions arch/x86/kvm/lapic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 331ca0f

Please sign in to comment.