Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1717138ybh; Mon, 20 Jul 2020 05:36:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvKBhdJh1YLJaMalr5ByQcFxyoao6krrmd98ivJ1b0u1uHjVU9YtQI8vArZMWfDTIQDwo6 X-Received: by 2002:a17:906:899:: with SMTP id n25mr19329344eje.298.1595248588404; Mon, 20 Jul 2020 05:36:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595248588; cv=none; d=google.com; s=arc-20160816; b=PyHT0+LaZwyGxxxyHmLgjGv2fsfKPvBedXHAfgK7apfXFB8nV2rs2Jc4vSvTCQlDoI 2vklJXZ22ZZheTpIrNVTX3tzj2tC3bc8On2MQjMFO29X24AN3cgTuRdfMHRxz5kUG7zE xh7WSg38jws0P6Ywl4GUuFBdRuNjR2f2yYH+UFCbaahlHY/J5Fkgas+RyOZkNYOHMqJb GvuMKpWmSlIOtAw9wDHmlxNNwKdNMHZIXjF6SUU0wP5T4DpPpdcyRlO9HXENRW8I40+R OAtg/iXe/+3GeqOqkkljeiPRJWV5O2vLY0HSXT/SBB+8uqi/TQYcjSPdjpQlXqG3dmiU aJcw== 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=QyfSYuwzCMJwlPSjgt3xH5r/wR3EoTKDYmEm2e5lk4g=; b=Y/JOmk8hZAsLCjqa+3qHICZQ1khmUYdEC0yI/nD+Xts0hxSfqMH5bBLZWs5mERP2Jd /Xsa/N/0QaprDDloJoOdp0zvfVM77fX9y87TszkcDv6jLmdvk4DALLinzcxncUWE+N/r /iwPvBdfgIUtNzy1y0OL4xcJWnCeK+OonY0SaX7l/MF/lld5OOCcnPIF/FAYB9XgHaGd 4PKtgCKjaVK20dKD1S8LUr0xPE2Vfy5IJubre50go4BdYW3Zz3UeMiNQTyc93GpCxdqS MVJg0MASgEPrES2U+qF87mPr9MQXFTcktIFwnClYzqCcTqNBG5NAmr8lFovNL1xbs5VF Rthw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="U0zlyf/8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id c9si6048990ejx.552.2020.07.20.05.36.05; Mon, 20 Jul 2020 05:36:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="U0zlyf/8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728508AbgGTMfp (ORCPT + 99 others); Mon, 20 Jul 2020 08:35:45 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:40292 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728074AbgGTMfo (ORCPT ); Mon, 20 Jul 2020 08:35:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595248543; 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=QyfSYuwzCMJwlPSjgt3xH5r/wR3EoTKDYmEm2e5lk4g=; b=U0zlyf/8KQE+1n6HF4otcfVHCMQBDb5tjUFiC/9NIQE9ktcWnPSA9ZRLB50pfJ1LrySbQK vs6hBky3XSIjPLzVkk9nB4tuC2uSF+OzRv7vyWn0e2fXjzxaXzY/WebsmoRr7TWICjFCIL 1MRFcUVRAFhcVcLxXu64kSPu61211nQ= 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-252-L7QMf2XhPMWTg43hs6byrQ-1; Mon, 20 Jul 2020 08:35:40 -0400 X-MC-Unique: L7QMf2XhPMWTg43hs6byrQ-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 2011A1E03; Mon, 20 Jul 2020 12:35:38 +0000 (UTC) Received: from [10.36.115.54] (ovpn-115-54.ams2.redhat.com [10.36.115.54]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4F15E90341; Mon, 20 Jul 2020 12:35:28 +0000 (UTC) Subject: Re: [PATCH v5 13/15] vfio/pci: Expose PCIe PASID capability to guest To: Liu Yi L , alex.williamson@redhat.com, baolu.lu@linux.intel.com, joro@8bytes.org Cc: kevin.tian@intel.com, jacob.jun.pan@linux.intel.com, ashok.raj@intel.com, jun.j.tian@intel.com, yi.y.sun@intel.com, jean-philippe@linaro.org, peterx@redhat.com, hao.wu@intel.com, stefanha@gmail.com, iommu@lists.linux-foundation.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <1594552870-55687-1-git-send-email-yi.l.liu@intel.com> <1594552870-55687-14-git-send-email-yi.l.liu@intel.com> From: Auger Eric Message-ID: <63d4c058-246d-1a11-af66-e97fd5ec9bd3@redhat.com> Date: Mon, 20 Jul 2020 14:35:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <1594552870-55687-14-git-send-email-yi.l.liu@intel.com> Content-Type: text/plain; charset=utf-8 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 Yi, On 7/12/20 1:21 PM, Liu Yi L wrote: > This patch exposes PCIe PASID capability to guest for assigned devices. > Existing vfio_pci driver hides it from guest by setting the capability > length as 0 in pci_ext_cap_length[]. > > And this patch only exposes PASID capability for devices which has PCIe > PASID extended struture in its configuration space. So VFs, will will s/will// > not see PASID capability on VFs as VF doesn't implement PASID extended suggested rewording: VFs will not expose the PASID capability as they do not implement the PASID extended structure in their config space? > structure in its configuration space. For VF, it is a TODO in future. > Related discussion can be found in below link: > > https://lkml.org/lkml/2020/4/7/693 > > Cc: Kevin Tian > CC: Jacob Pan > Cc: Alex Williamson > Cc: Eric Auger > Cc: Jean-Philippe Brucker > Cc: Joerg Roedel > Cc: Lu Baolu > Signed-off-by: Liu Yi L > --- > v1 -> v2: > *) added in v2, but it was sent in a separate patchseries before > --- > drivers/vfio/pci/vfio_pci_config.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/vfio/pci/vfio_pci_config.c b/drivers/vfio/pci/vfio_pci_config.c > index d98843f..07ff2e6 100644 > --- a/drivers/vfio/pci/vfio_pci_config.c > +++ b/drivers/vfio/pci/vfio_pci_config.c > @@ -95,7 +95,7 @@ static const u16 pci_ext_cap_length[PCI_EXT_CAP_ID_MAX + 1] = { > [PCI_EXT_CAP_ID_LTR] = PCI_EXT_CAP_LTR_SIZEOF, > [PCI_EXT_CAP_ID_SECPCI] = 0, /* not yet */ > [PCI_EXT_CAP_ID_PMUX] = 0, /* not yet */ > - [PCI_EXT_CAP_ID_PASID] = 0, /* not yet */ > + [PCI_EXT_CAP_ID_PASID] = PCI_EXT_CAP_PASID_SIZEOF, > }; > > /* > Reviewed-by: Eric Auger Thanks Eric