From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH] KVM: SVM: unconditionally wake up VCPU on IOMMU interrupt Date: Tue, 10 Oct 2017 21:17:17 +0200 Message-ID: <20171010191716.GD28763@flask> References: <1507633049-63191-1-git-send-email-pbonzini@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, suravee.suthikulpanit@amd.com To: Paolo Bonzini Return-path: Content-Disposition: inline In-Reply-To: <1507633049-63191-1-git-send-email-pbonzini@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 2017-10-10 12:57+0200, Paolo Bonzini: > 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. > > Signed-off-by: Paolo Bonzini > --- Reviewed-by: Radim Krčmář