Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6025267ybv; Wed, 12 Feb 2020 04:45:57 -0800 (PST) X-Google-Smtp-Source: APXvYqyRxmAgwGS+Vcv5RFkApbb0LMjBHBWqLKN/By0XjoiRbaAOb5XJeOqmeo8YmOrmkwonZgNu X-Received: by 2002:a54:448b:: with SMTP id v11mr5888411oiv.74.1581511557369; Wed, 12 Feb 2020 04:45:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581511557; cv=none; d=google.com; s=arc-20160816; b=Cy9OILQcigv5dXKtiFrvdfOPtkQgyrg3Cr8N9falr2h35E4E2DcndmGCMQFu2tSMDk Kf7Znp4nK+CjtwKTDRG8Q91IL21dj1ixi/yvaaHkrY2w2ipTrS/fefa3qKxBpqzrgSpa BwmBoVF9yBBDC/JGlz6PMoUZmv4Tetj2V2o+BKFGwJm7iqaD/7CxKaXYGFYLpvjsjz9c aDKLhFUK+FVp+gfTGD0bj7vm6atMleEqVImuqTTCDugk66qwUeVz8eObsYtsod6s5YJ/ njM4gbH/k+6/F/DbS3VdpgmP2ij/3GWgpI34kk/Ro3vqgL3lJYhZw2D0XfpzcrGQGUSA DRBg== 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=Hw0/W8D/Tq9lQe7PvCgtUb+BdMjG4YZ0IreP5BC1hFc=; b=JvivD5YfgbGV/iLIzBxD9uskLqX+bxvJjfLYcj6FEOf8wrc5rWitwn3lMI5UZXcGsS QVkR3iJ8R4+rWx3107cj5lpmMGMpb5EPN9e0F57TSBmpYlnS0fhDyd06dzdetLYQG5ei qW9GjOK56av4+4DVRHwDYeiV9uxlL+f7PtvgMqCM+jgU0rsOwbFXKiEAGYwVDMl9P+xq EwikTDbI7pDJqMlLrUb6xJG+70rhTxMuLbVtSczpFE9PMmrQi/doeyYxRUZESqFksZNK tB+pUOXu4ngs+UFXUs2ArJ+2coJWFcw6MoofyXIkVgRA1dullbDgQzVAvEDvzSmE6Yjz bI+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JA2+gqdc; 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 k15si3190812oij.134.2020.02.12.04.45.43; Wed, 12 Feb 2020 04:45:57 -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=JA2+gqdc; 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 S1727756AbgBLMoH (ORCPT + 99 others); Wed, 12 Feb 2020 07:44:07 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:28075 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725887AbgBLMoH (ORCPT ); Wed, 12 Feb 2020 07:44:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581511446; 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=Hw0/W8D/Tq9lQe7PvCgtUb+BdMjG4YZ0IreP5BC1hFc=; b=JA2+gqdcb6MhJiLj+yqTLcbw8RzSlhSq+DqLuRYUrHlNKIzDDxKUUUXzsjiAPX9gYm4HWu IRnfad403zO3QWT3tATavk5Hzbmvbj7vcKqhrjQZcgCwcsEYrVJ2UgFyUsMVfszFYUNKYR s1ODipQoByLHVRcHu7/wWB1CHk0xC2A= 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-423-VdayoA1AML-JVJj2TL9u4w-1; Wed, 12 Feb 2020 07:43:56 -0500 X-MC-Unique: VdayoA1AML-JVJj2TL9u4w-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2611D19251A0; Wed, 12 Feb 2020 12:43:54 +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 767AC60499; Wed, 12 Feb 2020 12:43:46 +0000 (UTC) Subject: Re: [PATCH V9 02/10] iommu/uapi: Define a mask for bind data To: Jacob Pan , 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 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> From: Auger Eric Message-ID: Date: Wed, 12 Feb 2020 13:43:43 +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: <1580277713-66934-3-git-send-email-jacob.jun.pan@linux.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > Link: https://lore.kernel.org/linux-iommu/20200109095123.17ed5e6b@jacob-builder/ not sure the link is really helpful. > > 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). > /** > * struct iommu_gpasid_bind_data - Information about device and guest PASID binding > * @version: Version of this data structure > Thanks Eric