Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3228998ybc; Mon, 18 Nov 2019 11:39:33 -0800 (PST) X-Google-Smtp-Source: APXvYqyiwsOJyzeuuHsBBS3fb85wC7jqdrVSQ2lYgXmJ5DH0cgFshSxftalMPQlZcV+y5fnRSZ48 X-Received: by 2002:a17:906:dda:: with SMTP id p26mr27880577eji.77.1574105973094; Mon, 18 Nov 2019 11:39:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574105973; cv=none; d=google.com; s=arc-20160816; b=nUhudVR9fENb136IwT5EPBRsowJKrE1t9Ik8OsEhdi/gtLCRakAl0aLIuQm/7TWiYW W1kWzcuNSF+4T2n7WXWa1GeyZGfmUhqTTZRKDm4/4lUl70lN3XjNGcRL7J1ZGIjOeeXX mgCPtvHKRJ74yCoHgU3WGTMA/0TiFkyNp/snbRnLW/wsXuGq4skGlLC+R1f52E5LHehW cPg67eBER/qamIjulUvj6IPyD01Dl7nPTTieHLUZw+J2xyjObtWI2qbedqYl8m1DzBRf IA/0RgZLU02sHLyxB8UtVIYRte3wQDf/YCQKIPYYYqQ2U9LMUckkkw8pMhgW+7LGFnlI erKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=isklaYUqjbqMuf0is7+wej1Ndf6joFqh93U4BsaFosg=; b=O3GA4ZdzhSreO0UhAW7uVZHtf+mXOcIIW/cnktEXd7RcXOwmjfwBLC/z3WbKbhR4yy Q1a3QmzEZvRfAlKW1LIAhIJpWjKX9JxNGnXGMm4HjrzEUMnPSLOnHYkPBIXXAcZFkXhx 0Sz2JCKKgQOgJI0RJwfgHzBtRkh/Z5THqxOOvSQUaXF9ywPByU/CmbKoNyh2L/xFje5+ je1duYph/LmEDDwlMA2g9hUyOPGYHXAuP96LN2BVS0IJwrrjseonooYkuZXQLIeNXEu+ LTVpy9IklCOhi47OTxV27A7cW3gbX0I7uI3s3fq9Qz0SchKOBHQ5qlYvjbZkwCJZct7+ HMJw== 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 cc4si13042622edb.237.2019.11.18.11.39.08; Mon, 18 Nov 2019 11:39:33 -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 S1726975AbfKRTiG (ORCPT + 99 others); Mon, 18 Nov 2019 14:38:06 -0500 Received: from mga02.intel.com ([134.134.136.20]:60276 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726833AbfKRTiB (ORCPT ); Mon, 18 Nov 2019 14:38:01 -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 orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Nov 2019 11:37:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,321,1569308400"; d="scan'208";a="380760868" Received: from jacob-builder.jf.intel.com ([10.7.199.155]) by orsmga005.jf.intel.com with ESMTP; 18 Nov 2019 11:37:59 -0800 From: Jacob Pan To: iommu@lists.linux-foundation.org, LKML , Joerg Roedel , "Lu Baolu" , David Woodhouse Cc: "Tian, Kevin" , Raj Ashok , "Yi Liu" , Eric Auger , Jacob Pan Subject: [PATCH v2 08/10] iommu/vt-d: Fix PASID cache flush Date: Mon, 18 Nov 2019 11:42:31 -0800 Message-Id: <1574106153-45867-9-git-send-email-jacob.jun.pan@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574106153-45867-1-git-send-email-jacob.jun.pan@linux.intel.com> References: <1574106153-45867-1-git-send-email-jacob.jun.pan@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; desc.qw1 = 0; desc.qw2 = 0; desc.qw3 = 0; -- 2.7.4