[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 0/7] SMMU handling for PCIe Passthrough on ARM


  • To: Julien Grall <julien@xxxxxxx>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Sun, 25 Jun 2023 14:28:05 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ANaoh4H2IU1H+49jUIcLNOQtDeymUMOLFQWr6x2Z3p4=; b=UTO6XYVVyDo3KtnVRQZ75U4POg08ryu/qn8ZuoKkM6xVweNhQP2llXw9uL/yGyzB7eco6Icru7laR64eVI1NQx49APx7CZGq4D3ClchqOJ0HXA0W/TSvpZLytnOuDuL2m/QsAnj34qdK/cpPyrDy9Dx/e3LCUhs/AsOwebMnfTZch4Dta1aOuCH1CEhEzIOj0KyiRzbR78iwFnBkPuKq1lFMoPoKY1dAlO1+cCkx7ou9m0P/qP3kBTPlHkDLvm/j7nRy+nQ3S8EzpaUYN9ErvTSV6e+xpiS97ltN+YLy6/aneTYmqxm1nar1OLSSO0lqWZWH5S6pMAY5DPvzsLs9Hw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T05QuoRckaSmcd5xVcLRSpcRi06mIoYNx/DnxHBVNtFxoGDZT7JeJ71CkHNQ9xAeDSWjIeFdhn7/UbfwuvxTu7i7qESRCnjj9K/vYttbpo1DwLsRBJ1dlhzqiqL1AqSpnwkgSiLWBWy1hwTEidkjbbsYUn7nQL+50tLqbbiLTppSQJR5d+GEPSKarLcQdweOBmQTiTyrkgfl29IOvLkoM+cQpEyevghnNNrcCKsPGVIFWzPO4BwbdDrI554tAKW5m7XogZsXiQR0gU532tevyQx4bXZtrpfovd5lwY7W+ZWvbxEYnd9rNrtp0OFR/rAX9JC4WRipU5tzcT75QcglwQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Sun, 25 Jun 2023 14:28:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZmOzwkN/rzzqOXEeFGAJzMhA6y69+7w0AgA15XICADy6aAIAAGZ8A
  • Thread-topic: [PATCH v4 0/7] SMMU handling for PCIe Passthrough on ARM

Hi Julien,

> On 25 Jun 2023, at 1:56 pm, Julien Grall <julien@xxxxxxx> wrote:
> 
> Hi,
> 
> On 15/06/2023 22:05, Stewart Hildebrand wrote:
>> On 6/7/23 03:19, Julien Grall wrote:
>>> On 07/06/2023 04:02, Stewart Hildebrand wrote:
>>>> This series introduces SMMU handling for PCIe passthrough on ARM. These 
>>>> patches
>>>> are independent from (and don't depend on) the vPCI reference 
>>>> counting/locking
>>>> work in progress, and should be able to be upstreamed independently.
>>> 
>>> Can you clarify how this code was tested? Does this require code not yet
>>> upstreamed?
>> I'm testing the series standalone (+ config changes) by using a PCI device 
>> in dom0, and also in combination with the vPCI series [3] [4] for 
>> passthrough to a domU.
>> Here are some more details on the test cases I'm using.
> 
> Thanks that's helpful! One comment about the first test case.
> 
>> 1. Using the PCI device in dom0 with the pci-passthrough=yes arg. In this 
>> case a couple of additional config changes [1] [2] are needed to select 
>> CONFIG_HAS_PCI=y, CONFIG_HAS_VPCI=y, and make has_vpci() return true. Aside 
>> from this series itself and the config changes, nothing else 
>> not-yet-upstreamed is required for this test case. It is on my TODO list to 
>> upstream these config changes, which I think will be useful on their own, 
>> not necessarily as part of any other series.
> 
> I find a bit confusing that the IOMMU support for dom0 is gated behind 
> 'pci-passthrough'. I was expecting that the iommu would also be properly 
> configured for PCI if we using 'iommu=yes'.

As per my understanding Xen can configure the iommus for PCI device without 
"pci-passthrough” enabled
if we follow below path:

   1) PCI host bridge is already enumerated and powered on in firmware before 
Xen boot
   2) PCI devices are scanned in Xen.
       
(https://gitlab.com/xen-project/people/bmarquis/xen-arm-poc/-/commit/bce463e1588a45e1bfdf59fc0d5f88b16604e439)
   3) After scanning the PCI devices add PCI devices to iommu ( 
iommu_add_device() )

If PCI host bridge is not enumerated then we need "pci-passthrough” enabled to 
allow Linux to do
enumeration and to inform Xen via PHYSDEVOP_pci_device_add hyper call to add 
PCI devices in Xen
This is implemented as part of PCI passthrough feature.

Regards,
Rahul


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.