Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1156286ybb; Fri, 20 Mar 2020 14:31:18 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvh8hV+WSmelET4Gnb5eQ/F9D8nxrOiEvAj+l2kEEw3sEidr9fX985Xojb/DnAWWVl2CJIa X-Received: by 2002:a05:6830:146:: with SMTP id j6mr8599525otp.117.1584739878647; Fri, 20 Mar 2020 14:31:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584739878; cv=none; d=google.com; s=arc-20160816; b=iwDcn/gYT6sUOZkKw1XRctreN5wFjaft2zISGauFPclV7oTRnp+8XZ8g6WwhgUHUtL wegdZU8FEczFzvudtZOC9swkP126wNe/V5n1soRpWd2Ctm5WVE/Lv3VnwqNKDEfro4lq GtSRdpjGLkyAngLrcB9NnFlvmM9fkwYoS8w6KvcvaSE5AyUJFU9/RQMbAdPdWuBRzY5V C251vYJ+DzGWux/3xKRIj8+6o3kZuMrVYl1/K7ki3JvnZVwF9QM2ZMK6BOUPrXSgmWTv cM0r4Q9bTArz+/p0HK+Z54LI6JNgo454njq/lsa8Zz5ytwQA20CS/abxVxReZzGQpvz6 cZaQ== 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:ironport-sdr:ironport-sdr; bh=LqJRYxNsWW5xSU7i2JbLmu5zZNcYwStUcqpKM8RbhQc=; b=EG53NsUtUNcv/zhbwksjeLAW8IHzZbVM1XL9qFBTPvwjVqQgIfpykOFbsE8usyb39D kOk4ZkYZzW6gXRiv33HliiTlkXhHKdFvmLIzdEELGDcfsn/kZwKObVh61BCou5Jhsyv9 wvKcFv8tu4CgyVjO+k8ex4/LWM1SrLUnmDjhcra/YeeDzyFumMS6gZx4DvrJgf43g1oB WQ6eWY+3dSSJFWhAgWYIqULDhSxRS5KKMDypIaBOuqBXdJLQLqEiH7mpmHVveivM+Bpp h39ppp/5qzrlyDDY594do2KRhE3EtjWK9oSIrU1+HUFnbjTAt9MgyhDTDScU3papf83V vkXg== 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 d27si3561942otf.22.2020.03.20.14.31.05; Fri, 20 Mar 2020 14:31:18 -0700 (PDT) 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 S1727479AbgCTVaQ (ORCPT + 99 others); Fri, 20 Mar 2020 17:30:16 -0400 Received: from mga12.intel.com ([192.55.52.136]:22684 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726935AbgCTVaO (ORCPT ); Fri, 20 Mar 2020 17:30:14 -0400 IronPort-SDR: kSePeINvczItTPF6khRq1602Cpx4z9Go+JxpCJY2bLF1LJfwdlb8zRzWVf4+PF6wBPflE8pVUB C5DfOov/twDA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2020 14:30:14 -0700 IronPort-SDR: 7wo3zcGm4hq6KANZAFHmC5DfE/INzc2Gh0T2bUeWgeTIJgm2mVdDyWIAeS/a6nuBHhqT5wGvv4 +8bC7NPHAOAg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,286,1580803200"; d="scan'208";a="324984109" Received: from jacob-builder.jf.intel.com (HELO jacob-builder) ([10.7.199.155]) by orsmga001.jf.intel.com with ESMTP; 20 Mar 2020 14:30:13 -0700 Date: Fri, 20 Mar 2020 14:35:55 -0700 From: Jacob Pan To: Auger Eric Cc: iommu@lists.linux-foundation.org, LKML , Lu Baolu , Joerg Roedel , David Woodhouse , Yi Liu , "Tian, Kevin" , Raj Ashok , Alex Williamson , Christoph Hellwig , Jean-Philippe Brucker , Jonathan Cameron , jacob.jun.pan@linux.intel.com Subject: Re: [PATCH V9 02/10] iommu/uapi: Define a mask for bind data Message-ID: <20200320143555.15bf7c7a@jacob-builder> In-Reply-To: References: <1580277713-66934-1-git-send-email-jacob.jun.pan@linux.intel.com> <1580277713-66934-3-git-send-email-jacob.jun.pan@linux.intel.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 Wed, 12 Feb 2020 13:43:43 +0100 Auger Eric wrote: > Hi Jacob, > > On 1/29/20 7:01 AM, Jacob Pan wrote: > > Memory type related guest PASID bind data can be grouped together > > for one simple check. > Those are flags related to memory type. right, will rephrase. > > Link: > > https://lore.kernel.org/linux-iommu/20200109095123.17ed5e6b@jacob-builder/ > not sure the link is really helpful. > > will delete. the patch is very simple. > > Signed-off-by: Jacob Pan > > --- > > include/uapi/linux/iommu.h | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/include/uapi/linux/iommu.h b/include/uapi/linux/iommu.h > > index 4ad3496e5c43..fcafb6401430 100644 > > --- a/include/uapi/linux/iommu.h > > +++ b/include/uapi/linux/iommu.h > > @@ -284,7 +284,10 @@ struct iommu_gpasid_bind_data_vtd { > > __u32 pat; > > __u32 emt; > > }; > > - > > +#define IOMMU_SVA_VTD_GPASID_EMT_MASK > > (IOMMU_SVA_VTD_GPASID_CD | \ > > + IOMMU_SVA_VTD_GPASID_EMTE > > | \ > > + IOMMU_SVA_VTD_GPASID_PCD > > | \ > > + > > IOMMU_SVA_VTD_GPASID_PWT) > Why EMT rather than MT or MTS? > the spec says: > Those fields are treated as Reserved(0) for implementations not > supporting Memory Type (MTS=0 in Extended Capability Register). > MTS makes more sense, will change. It was from hygiene p.o.v. checking the flag to avoid touching these fields. Thanks, Jacob > > /** > > * struct iommu_gpasid_bind_data - Information about device and > > guest PASID binding > > * @version: Version of this data structure > > > > Thanks > > Eric > [Jacob Pan]