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

Re: [RFC PATCH 2/6] xen/public: arch-arm: reserve resources for virtio-pci


  • To: Julien Grall <julien@xxxxxxx>
  • From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Thu, 16 Nov 2023 16:53:49 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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=ObtFzB/EJgjKxULECZJvr2iPpfS5cnBO61g5/t9IYu4=; b=oRfhhuAEPfIOrDlShlMGf0NmqSYdT8hvIVBmoHpMoaMH6Z75c01VC6mW8Nvq6ZQTP+kKNw2Cofx2WwFa2sfXXP1vM3brp4GJMywh5+49/Wfg1UJA6vCifugv3kuOSbWC/Ycfs8E8XZej+LEnIAGeIb146PWpOUb1G9TBN69i+vFouph1s3Q9Cwtxv4QlSs64OTQl3oPyOm/4cJ1HwbiatTynATX/L2dgcHz0CaMiU3JQBeqVn4OuwLMo/0K10+DbXInKIBeIx83BvqqSlW/eiNhvrr6hUUv0Zb+r8XtqiUxDbv6KCiWU2Q+c32VtqsewAiNRbKYLAG3z0R6Y4sJ1LA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mwBSmbjHUI3QAuk0XNLQujFIu+jUn8mRbKeXfrYETyFgKg9PGch9wRwHsgNuXSp+0Gn+4QO/E2HwJ+ni8nSYWUoTL+zkrrLAvLE5DrDNEQKt3OsA1KdWN9hEPk4qkYlqH+SYH3gyHhIUHdrIi5fozDQo4vIIL2+ufuqR5w2yYoJPh0Znd74v5QAZtY13nK1cGI1NAc9VBKqGyOHkWC6SP8ceZkNVPmMZp29mUMRiMfCk4uclV4NZ0R5MbT3NvH18JHUoME+tj9DMZM3fK+yA7ZS7iiuZul8Stvu+i8ND36TIDh2dtc4y6oEkxh/Ao1MaYMdYwGdQZ1UVzJEJjWhuYw==
  • Cc: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>, Sergiy Kibrik <Sergiy_Kibrik@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "vikram.garhwal@xxxxxxx" <vikram.garhwal@xxxxxxx>
  • Delivery-date: Thu, 16 Nov 2023 16:54:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHaF7/0FLT7PaxCl0mKzTq8kNpAxLB7mIqAgABuuwCAAP6dAIAACUiAgAAD6wCAAAjzAIAAC4aA
  • Thread-topic: [RFC PATCH 2/6] xen/public: arch-arm: reserve resources for virtio-pci

Hi Julien,

Julien Grall <julien@xxxxxxx> writes:

> On 16/11/2023 15:26, Stewart Hildebrand wrote:
>> On 11/16/23 10:12, Julien Grall wrote:
>>> Hi Volodymyr,
>>>
>>> On 16/11/2023 15:07, Volodymyr Babchuk wrote:
>>>> With my vPCI patch series in place, hypervisor itself assigns BDFs for
>>>> passed-through devices. Toolstack needs to get this information to know
>>>> which BDFs are free and can be used by virtio-pci.
>>>
>>> It sounds a bit odd to let the hypervisor to assign the BDFs. At
>>> least because there might be case where you want to specific vBDF
>>> (for instance this is the case with some intel graphic cards). This
>>> should be the toolstack job to say "I want to assign the pBDF to
>>> this vBDF".
>> Keep in mind we are also supporting dom0less PCI passthrough.
> Right, but even with that in mind, I expect the Device-Tree to provide
> the details where a given PCI is assigned.
>
> You could have logic for assigning the BDF automagically. But that
> should be part of dom0less, not deep into the vPCI code.

As far as I know, right now toolstack does not allow you to assign BDF
in any form. For x86 there are two options, and they are controlled by
"passthrough" option of xen-pciback driver in Linux:

  "Option to specify how to export PCI topology to guest:"
  " 0 - (default) Hide the true PCI topology and makes the frontend"
  "   there is a single PCI bus with only the exported devices on it."
  "   For example, a device at 03:05.0 will be re-assigned to 00:00.0"
  "   while second device at 02:1a.1 will be re-assigned to 00:01.1."
  " 1 - Passthrough provides a real view of the PCI topology to the"
  "   frontend (for example, a device at 06:01.b will still appear at"
  "   06:01.b to the frontend). This is similar to how Xen 2.0.x"
  "   exposed PCI devices to its driver domains. This may be required"
  "   for drivers which depend on finding their hardward in certain"
  "   bus/slot locations.");

Also, isn't strict dependency on BDF breaks the PCI specification? I
mean, of course, you can assign Function on random, but what about Bus
and Device parts?


I mean, we can make toolstack responsible of assigning BDFs, but this
might break existing x86 setups... 

-- 
WBR, Volodymyr


 


Rackspace

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