From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756390AbdJJTRW (ORCPT ); Tue, 10 Oct 2017 15:17:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42892 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751853AbdJJTRU (ORCPT ); Tue, 10 Oct 2017 15:17:20 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5835D3680A Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=rkrcmar@redhat.com Date: Tue, 10 Oct 2017 21:17:17 +0200 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, suravee.suthikulpanit@amd.com Subject: Re: [PATCH] KVM: SVM: unconditionally wake up VCPU on IOMMU interrupt 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1507633049-63191-1-git-send-email-pbonzini@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 10 Oct 2017 19:17:20 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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ář