Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1243508ybb; Fri, 20 Mar 2020 16:23:58 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvhA8FuC15CcAm91/yMdRPqvTE7XkAH9a+frd/0gyWJz/xh12YvZQvN9JIcjxXkUH+Jh5I/ X-Received: by 2002:aca:cc08:: with SMTP id c8mr8493299oig.42.1584746638109; Fri, 20 Mar 2020 16:23:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584746638; cv=none; d=google.com; s=arc-20160816; b=IcM7jjGVe1SHd2LGTYCWVXXTmbcR8SFyPvy0fue+B5ZGnwVAti+yvSyWrNS3zKV7Rm FbNrKf7yl8WD61Ny+womSqmC4UPcKqAlON5lJdRKuk8/bfmpmp0u1HP6WzoEGCcpAWWq 0BizYajG4+6uUqZk8krMv0MMbzu9hCVssuiSLFHkHHCz8bnpEh+ixcjI0geQqXguOzuS Xx1n7WRAC1qGa0+4UuQuLnmv0fJr80QjAREv8VFu/NPL0AYsJnBMr0WIOz55/CMirDoP XHgSGEjFDsRi1S0f4ktn1QQAZkjHdz3/6LWIjW5tBsBQHAKBkZvVnnP2NMmlSQau85zr aezA== 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:ironport-sdr:ironport-sdr; bh=tEv2+HyZDrFN8nPR5rvBxBcijve9MEmLlEtcuZuRpo0=; b=ACPxw+SktHfNAhUsu54qrCGh1S8kGlZuaemFCJ75xBT9Rh6EvQK0P/sQWFNqBNRpaM /bc0qbYrKEQxJmljzhbEwPt1TPa/mbgVGJ0gbsL/tfA8ORx6NIl9b9xp27UUx/WZhfXO OFI3zipND6uQN6iCl0kyEkzX2ecgWhxoq2ZpNZpffQGDE3ir+ZQAEEEQMtwPN7PooUJS kZ+u/aZJVSBeta8BT7LvRfnVkHV0GlPKWIZuP72/HlW582h1vyKFb1U0sPUVbJadFjZL QLuQyuVYdx5BD5p0W2CA0E2edS714689fhFNR9ZQdGL9iDDWGm9e82CLCDLCm8lJNXos 8E9g== 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 j206si3792091oia.158.2020.03.20.16.23.46; Fri, 20 Mar 2020 16:23:58 -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 S1727468AbgCTXWC (ORCPT + 99 others); Fri, 20 Mar 2020 19:22:02 -0400 Received: from mga18.intel.com ([134.134.136.126]:42258 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727400AbgCTXWC (ORCPT ); Fri, 20 Mar 2020 19:22:02 -0400 IronPort-SDR: ggZTnXPZsE+aVubbMLWwwSIdXDy9qsy3Ns6pLPyEFOACb6dONfZMOSCvKg2sI3D5hoXFxy3dMS hC4/NA4unwhA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2020 16:22:01 -0700 IronPort-SDR: 7HWaRnyyskbWMO/IcOtuDiEPHqo726e+PFwCVlYHd2gKY0ffSvH8WISZ/ZEF+QwM2BisSlfx4x 7hSljLqOenFQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,286,1580803200"; d="scan'208";a="418877224" Received: from jacob-builder.jf.intel.com ([10.7.199.155]) by orsmga005.jf.intel.com with ESMTP; 20 Mar 2020 16:22:01 -0700 From: Jacob Pan To: "Lu Baolu" , iommu@lists.linux-foundation.org, LKML , Joerg Roedel , David Woodhouse , Alex Williamson , Jean-Philippe Brucker Cc: "Yi Liu" , "Tian, Kevin" , Raj Ashok , "Christoph Hellwig" , Jonathan Cameron , Eric Auger , Jacob Pan Subject: [PATCH V10 02/11] iommu/uapi: Define a mask for bind data Date: Fri, 20 Mar 2020 16:27:32 -0700 Message-Id: <1584746861-76386-3-git-send-email-jacob.jun.pan@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584746861-76386-1-git-send-email-jacob.jun.pan@linux.intel.com> References: <1584746861-76386-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 flags can be grouped together for one simple check. --- v9 renamed from EMT to MTS since these are memory type support flags. --- 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..d7bcbc5f79b0 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_MTS_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