Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3442293ybc; Mon, 18 Nov 2019 15:37:35 -0800 (PST) X-Google-Smtp-Source: APXvYqz+G4cXL0eDbIPDo9hdch8sV0iQ2+ZLdY3fbd/aAUQu+Xus6oX2WusrpqA1qpZZfffMbh/T X-Received: by 2002:a17:906:c44f:: with SMTP id ck15mr30089120ejb.7.1574120255230; Mon, 18 Nov 2019 15:37:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574120255; cv=none; d=google.com; s=arc-20160816; b=geLUiwWVjXZdBxbsMT2DKodOdgyF3k+9AzB44NownxgcN2ZOpfyzLMh/tzmC1SdVtG +T8M4sHAFX5wRKKLlYwzPmtuoTVwXrcClNs4Uilv44mBvYjgqPRKOJKjiE9ODSZyRFcc 6JsSVRZx1dJiIvPkNhX0ZTnNjmthVkwnrHrpxKGwgCmJpMZP5Oetl04+d5LPZkLMoY/i 4YQDvifZ8I+V6WgaLMNYDJPO15VBzEVuiu+9CczfiPE1AouR91oUhfyN5xaTBBSTSyxn LxYtFW883UP3MvtTgHBDVOogAlvj13AgtKQYiQB/Eg3/Q1FzsdRsLXutoLgC3LW19ebG IqOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=9XifwtZgDUuWH/ID1cC+mpkW6KTHMoGqFRiH1zFVIII=; b=lv99Hzl/nEhs+xXA7qHsvl44jy1AxPy2Fq7ajpphlScXPacqL19/y/Z+/qGWRG9dUI kTKeMXQ1/Kx7S+KwC2rHWskmYyJbPgorUPMvyAEo8ZQD4X6N/XnZBr5BJ2QDDi01FbFU TqId7YCvvnVfC92uUjEwua47HHsfLFBmgdlHUbq3/6mjJWQiOuQfyhQAUJ8zla5ZcS4p Ybu70GhTo3k5teVHLnD4XkLh+mvwGt6SagB0YLPJOBeePbmv7mK5Tqpi9OQ6QGKaCXP+ hmTCAORpnlg0ErUX6fAq5yX/fjLiyLBbKRgheVdsEfIJ8w9WQdaLwSGvsSaGhSU9SGAA HISQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k24si12787834ejv.111.2019.11.18.15.37.11; Mon, 18 Nov 2019 15:37:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726962AbfKRXdw (ORCPT + 99 others); Mon, 18 Nov 2019 18:33:52 -0500 Received: from mga04.intel.com ([192.55.52.120]:10129 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726809AbfKRXdw (ORCPT ); Mon, 18 Nov 2019 18:33:52 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Nov 2019 15:33:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,321,1569308400"; d="scan'208";a="380824660" Received: from jacob-builder.jf.intel.com (HELO jacob-builder) ([10.7.199.155]) by orsmga005.jf.intel.com with ESMTP; 18 Nov 2019 15:33:51 -0800 Date: Mon, 18 Nov 2019 15:38:27 -0800 From: Jacob Pan To: Auger Eric Cc: iommu@lists.linux-foundation.org, LKML , Joerg Roedel , Lu Baolu , David Woodhouse , "Tian, Kevin" , Raj Ashok , Yi Liu , jacob.jun.pan@linux.intel.com Subject: Re: [PATCH v2 08/10] iommu/vt-d: Fix PASID cache flush Message-ID: <20191118153827.4748c015@jacob-builder> In-Reply-To: <38c0f6f0-b751-6b23-2292-5f08bdfff5c9@redhat.com> References: <1574106153-45867-1-git-send-email-jacob.jun.pan@linux.intel.com> <1574106153-45867-9-git-send-email-jacob.jun.pan@linux.intel.com> <38c0f6f0-b751-6b23-2292-5f08bdfff5c9@redhat.com> Organization: OTC X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 18 Nov 2019 22:19:03 +0100 Auger Eric wrote: > Hi Jacob, > On 11/18/19 8:42 PM, Jacob Pan wrote: > > Use the correct invalidation descriptor type and granularity. > > > > Signed-off-by: Jacob Pan > > Acked-by: Lu Baolu > > --- > > drivers/iommu/intel-pasid.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/iommu/intel-pasid.c > > b/drivers/iommu/intel-pasid.c index 3cb569e76642..ee6ea1bbd917 > > 100644 --- a/drivers/iommu/intel-pasid.c > > +++ b/drivers/iommu/intel-pasid.c > > @@ -365,7 +365,8 @@ pasid_cache_invalidation_with_pasid(struct > > intel_iommu *iommu, { > > struct qi_desc desc; > > > > - desc.qw0 = QI_PC_DID(did) | QI_PC_PASID_SEL | > > QI_PC_PASID(pasid); > > + desc.qw0 = QI_PC_DID(did) | QI_PC_GRAN(QI_PC_PASID_SEL) | > > + QI_PC_PASID(pasid) | QI_PC_TYPE; > Hum I am confused > > #define QI_PC_PASID_SEL (QI_PC_TYPE | QI_PC_GRAN(1)) > My mistake. I redefined QI_PC_PASID_SEL and QI_PC_ALL_PASIDS without QI_PCI_TYPE such that they can be used in the granularity conversion table. But did not include in this patch. I will drop this patch and keep it with the next series. > So the original looks correct to me? > > Thanks > > Eric > > > > > desc.qw1 = 0; > > desc.qw2 = 0; > > desc.qw3 = 0; > > > [Jacob Pan]