Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp199986ybl; Tue, 28 Jan 2020 21:58:51 -0800 (PST) X-Google-Smtp-Source: APXvYqw665sIO9H6raYBgtKRlxYfvBtcxUp83DI9hNNSJCZYKZ8mEX30wlGWvUomOXJJHA+7sMKv X-Received: by 2002:a05:6830:1689:: with SMTP id k9mr19733998otr.311.1580277531171; Tue, 28 Jan 2020 21:58:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580277531; cv=none; d=google.com; s=arc-20160816; b=IL5Qv3mNSk8EhFm+W6s1PV47H/aop9sbXus8O25OsZBN1cbL7fYW2kzdyvPLAysCq9 OTXg44xcXD/7woAbGUnBmAKePhaZ2Lx9j5pDkOS5Aproxc6PfepvzAgYAvROD3NPZZZx xYmIbMAV+KxDtZq4A/fxtbNMJfnBAU6pGv3yMUjOxzVxVDStY9cmHOoo2klqwysikncq /PN9ZRiENwug5kOy39XGPmE18Kr8LujYxx74ZWikIWGxS4yXhQ6rt/zNLexHFWOioNP2 KQfs64Knxk8P6u5GTXAJK8ernprHqm+nUxnYZxyELZip/bM44yCCe/VfwF+HCIwzcuPc xwKw== 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=1jUtIcEhPYJg/ixPTgEjZBZexhzsU70nXBT9THxZQvc=; b=mR86ABz2hs6v+7aHOpsMb39MRSvcAf2i9/rk8IzjWXQ6wK0Guelh4aGO88vJ/jyS3e wOlUwAoT6i32+Bi6O1EIGiGArAnGmXJ9G488fo5Bg4O2nNRUsEpjvcGxYGb+g25GpZJn 6kPxhzC3XU/0ZCXtAD6NTeALSYKP431dQvLV7IPnjOGFlOBGdVybZp1JSo4HGIFFGQl+ mc+C05F7WQPSjBo4NZhrQJnKup47bheAgSaX5nwbp0q8M6TMpgFcX/MVQ2z0T0l2YDw7 F2qg7CnYxG8DWPldK+j/6zc+SufYdOFJ8LzvHuRAxD+sNeYARTt1jCmvykC99nycGbCm LiMA== 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 y20si654936otq.190.2020.01.28.21.58.39; Tue, 28 Jan 2020 21:58: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; 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 S1726762AbgA2F5Z (ORCPT + 99 others); Wed, 29 Jan 2020 00:57:25 -0500 Received: from mga05.intel.com ([192.55.52.43]:23417 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726091AbgA2F4n (ORCPT ); Wed, 29 Jan 2020 00:56:43 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jan 2020 21:56:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,376,1574150400"; d="scan'208";a="222346518" Received: from jacob-builder.jf.intel.com ([10.7.199.155]) by orsmga008.jf.intel.com with ESMTP; 28 Jan 2020 21:56:41 -0800 From: Jacob Pan To: iommu@lists.linux-foundation.org, LKML , "Lu Baolu" , Joerg Roedel , David Woodhouse Cc: "Yi Liu" , "Tian, Kevin" , Raj Ashok , Alex Williamson , "Christoph Hellwig" , Jean-Philippe Brucker , Jonathan Cameron , Eric Auger , Jacob Pan Subject: [PATCH V9 02/10] iommu/uapi: Define a mask for bind data Date: Tue, 28 Jan 2020 22:01:45 -0800 Message-Id: <1580277713-66934-3-git-send-email-jacob.jun.pan@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1580277713-66934-1-git-send-email-jacob.jun.pan@linux.intel.com> References: <1580277713-66934-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 Memory type related guest PASID bind data can be grouped together for one simple check. Link: https://lore.kernel.org/linux-iommu/20200109095123.17ed5e6b@jacob-builder/ 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) /** * struct iommu_gpasid_bind_data - Information about device and guest PASID binding * @version: Version of this data structure -- 2.7.4