OSDN Git Service

KVM: SVM: unconditionally wake up VCPU on IOMMU interrupt
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 10 Oct 2017 10:51:56 +0000 (12:51 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 12 Oct 2017 12:01:54 +0000 (14:01 +0200)
commit1cf53587c03025885af359da3bd0be091aa34b53
treefd3205a5e0df998685918af87e4ce92f70be0951
parentc1bd743e54cd653bd5e7082255dc236cfd40dbf0
KVM: SVM: unconditionally wake up VCPU on IOMMU interrupt

Checking the mode is unnecessary, and is done without a memory barrier
separating the LAPIC write from the vcpu->mode read; in addition,
kvm_vcpu_wake_up is already doing a check for waiters on the wait queue
that has the same effect.

In practice it's safe because spin_lock has full-barrier semantics on x86,
but don't be too clever.

Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm.c