Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp782497ybb; Fri, 3 Apr 2020 11:42:43 -0700 (PDT) X-Google-Smtp-Source: APiQypIIl1zyEns6AHFz1xVdOv/zpIMilRBvpnRuD0cMqYyhEN0ime+yGGCckUF4Yy0CISNM5c55 X-Received: by 2002:aca:b7c1:: with SMTP id h184mr4239786oif.77.1585939363760; Fri, 03 Apr 2020 11:42:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585939363; cv=none; d=google.com; s=arc-20160816; b=Tru5qgXMK0h6piw1ot6mOx8F4/owPFhLI4a1Gmd891gTgbUGyKa+g4eTbSIVaDkZQK feG2ZuZlF5GTlh3yGOcp2u4tIDzUnG26AB6+g4DLE6BcSkjWhk8g9yX6HxQaKk2PYusE 6ppYiltnUYAQS+Y8XZjrcII2mNB4ZKU0EV0Z+S3rbZ4syDT4TxxPa0KB84lToRDIv+QR wwYYB/HnPgW7ZmJkfYl5P7TsKXIxCy/BF5IDQcVF5GBDX+KIK7IDozZIgeXVRxnR1A8Y uN3wnjDaZjSpcQRRUtEThr3uPf3hwJLWKOz1NoFEITYB4Pe4hZz+3hhD/gAAedWWy6/O C5xg== 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=zSxtCYNsKXGU1fYQQtgjnToyoRdCK22dUu1Cv/BGNHQ=; b=aaJOu8ZWU1a76CYLMon3CqPK1gBE378NS2HWQ47V5jzPw6Q9ft9Sf8meE9Jz/tOe9O cjCRgOe+4dvwHgrQSYmfWl4D1oUAD4lWVGp70ESTW5wWHTxKaQk6JWmRc8n/lu+OoaQQ mUm+oR+XKAe18bslxpP0JXyWtjem2+5WiIN3uSe1lfojsMn8+IgVhilWn5rI79yebg0z UCRPWSifYKDeniDYQzi7RzWHLa9HnTRA46IqZmuavSUTKoPm/bJsslRlL/gYi6LlVVcw VG8AV4lizAxJWPC65iZeHe/Ybw9l4SpsTOA7Ei5Fg3dM/FDa95KBghfKNHUTDqiJuXeo tM1w== 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 w83si4009078oie.244.2020.04.03.11.42.30; Fri, 03 Apr 2020 11:42:43 -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 S2404402AbgDCSg3 (ORCPT + 99 others); Fri, 3 Apr 2020 14:36:29 -0400 Received: from mga17.intel.com ([192.55.52.151]:4672 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728066AbgDCSg2 (ORCPT ); Fri, 3 Apr 2020 14:36:28 -0400 IronPort-SDR: idEO+4dIG1YCcp8yd3lnDtXZFa6wzpx0KYtGE8+CL9UOqeBk4ja1LsIX75A1MakMvNpWvLtU7F OMdASvatviFw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2020 11:36:27 -0700 IronPort-SDR: D+jZjWNSavh+SQpoO6seu7Ay4FcTHMwV/PvUJIzzqiJfAUZq6CCw+I4cvhZ8f3Jon9VnGSPmFZ zS90hK3KySxQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,340,1580803200"; d="scan'208";a="268439811" Received: from jacob-builder.jf.intel.com ([10.7.199.155]) by orsmga002.jf.intel.com with ESMTP; 03 Apr 2020 11:36:27 -0700 From: Jacob Pan To: "Lu Baolu" , iommu@lists.linux-foundation.org, LKML , Joerg Roedel , David Woodhouse , Jean-Philippe Brucker , Eric Auger Cc: "Yi Liu" , "Tian, Kevin" , Raj Ashok , Alex Williamson , "Christoph Hellwig" , Jonathan Cameron , Jacob Pan Subject: [PATCH v11 02/10] iommu/uapi: Define a mask for bind data Date: Fri, 3 Apr 2020 11:42:06 -0700 Message-Id: <1585939334-21396-3-git-send-email-jacob.jun.pan@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1585939334-21396-1-git-send-email-jacob.jun.pan@linux.intel.com> References: <1585939334-21396-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. --- Reviewed-by: Eric Auger 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