Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3327321ybc; Mon, 18 Nov 2019 13:22:51 -0800 (PST) X-Google-Smtp-Source: APXvYqyXTffX1OtknGsuWey3zvKc6nhzG6VK61pqfY11SkAwD1KbdX95CC7/1TavWlLVAZmFuFjm X-Received: by 2002:a1c:64d4:: with SMTP id y203mr1497206wmb.27.1574112171227; Mon, 18 Nov 2019 13:22:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574112171; cv=none; d=google.com; s=arc-20160816; b=u2DtfufVWJ7siBJMR77nNwIR9i/7nxg09g5cphEnL/E/qdNsy/InnfLXd2pqvidhk7 P7+Mb49OYicnEa+TAeSOmksfjZtzASg0V0fbqhMmWQVZfoI2p5TySJuTHPIXZJ7pKXBE yIrDRu9tUFPcAv3eJPbh6TNx+ey6PHUfawEh3pvhF3LLDb3AT51bbNr+9J+dgoe2e/T6 JcKQBgH6NoH4j8S9sj7gVl/xW6deTiXlZFWX2VZsL/A96E4QXjF2r085k4hpnPohZ8fv o5eSRBFFrKcmDgzHtvBKmmQseUOwV/pqgTbasQfL/+n4l4Toyvqy4thRP7gaovwy95S7 TVoQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=iwb2bwcFnEMR2kD+UpG+jcPlEIshwrO3tV1AWtPKMJs=; b=c3xYp+tm+9cepUBJgnf4u16bHpopAI8c/IsgDk3ZGCliQHivhHocYUQTmhFcl4OfwO iXJ7FeQ5RPG1sDyq9w2genqxR6215FXCb0Pko/Mfe9yQeGJ6UDA3TklxYGy3KhKLMHjM uV+rlCcN2fhXrPSi2j3JPPHyrZWFgdXexp3esAeE5551peAwFb2kNlM6DrP5Hc+AxsD6 z44RdAFJXLSPRAxhpOzEkrw2APCkDPSqVFJNa1stTMuC/3OM3JD/IlreeK8jXT7D99lj RUQ1E9FDw7GSfij8HXjodXGmte8mxDGyGPGLL26BixX6MWvuo3eNtHSmb3eoOJ1iswiZ i+FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FRBnbdQG; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z44si15970826edz.211.2019.11.18.13.22.26; Mon, 18 Nov 2019 13:22:51 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FRBnbdQG; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726706AbfKRVTO (ORCPT + 99 others); Mon, 18 Nov 2019 16:19:14 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:24488 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726272AbfKRVTN (ORCPT ); Mon, 18 Nov 2019 16:19:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574111952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iwb2bwcFnEMR2kD+UpG+jcPlEIshwrO3tV1AWtPKMJs=; b=FRBnbdQGQ8P5dTQSjK+HMJiBHhXJoy8p3ajbRH98IFwOFFk0osT1nuHguYkNaq+spHyjfp amdfwV88NF7yGjpEIhI3Gio3rsrGRmcyZXk8WUvzOnu/u3ExhKdryEQqWLtNkp/7Gdszm+ 2ZsxJSIppP97ilgm8fLE7sv/WGAlBJE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-108-8hb4A3LoM3WaSexlLsJtrw-1; Mon, 18 Nov 2019 16:19:09 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D48E81802CFA; Mon, 18 Nov 2019 21:19:07 +0000 (UTC) Received: from [10.36.116.37] (ovpn-116-37.ams2.redhat.com [10.36.116.37]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5D9289302; Mon, 18 Nov 2019 21:19:05 +0000 (UTC) Subject: Re: [PATCH v2 08/10] iommu/vt-d: Fix PASID cache flush To: Jacob Pan , iommu@lists.linux-foundation.org, LKML , Joerg Roedel , Lu Baolu , David Woodhouse Cc: "Tian, Kevin" , Raj Ashok , Yi Liu 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> From: Auger Eric Message-ID: <38c0f6f0-b751-6b23-2292-5f08bdfff5c9@redhat.com> Date: Mon, 18 Nov 2019 22:19:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <1574106153-45867-9-git-send-email-jacob.jun.pan@linux.intel.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: 8hb4A3LoM3WaSexlLsJtrw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jacob, On 11/18/19 8:42 PM, Jacob Pan wrote: > Use the correct invalidation descriptor type and granularity. >=20 > Signed-off-by: Jacob Pan > Acked-by: Lu Baolu > --- > drivers/iommu/intel-pasid.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > 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_iomm= u *iommu, > { > =09struct qi_desc desc; > =20 > -=09desc.qw0 =3D QI_PC_DID(did) | QI_PC_PASID_SEL | QI_PC_PASID(pasid); > +=09desc.qw0 =3D QI_PC_DID(did) | QI_PC_GRAN(QI_PC_PASID_SEL) | > +=09=09QI_PC_PASID(pasid) | QI_PC_TYPE; Hum I am confused #define QI_PC_PASID_SEL (QI_PC_TYPE | QI_PC_GRAN(1)) So the original looks correct to me? Thanks Eric > =09desc.qw1 =3D 0; > =09desc.qw2 =3D 0; > =09desc.qw3 =3D 0; >=20