All of lore.kernel.org
 help / color / mirror / Atom feed
From: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
To: Julien Grall <julien@xen.org>
Cc: Stewart Hildebrand <stewart.hildebrand@amd.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Oleksandr Tyshchenko <Oleksandr_Tyshchenko@epam.com>,
	Sergiy Kibrik <Sergiy_Kibrik@epam.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Michal Orzel <michal.orzel@amd.com>,
	"vikram.garhwal@amd.com" <vikram.garhwal@amd.com>
Subject: Re: [RFC PATCH 2/6] xen/public: arch-arm: reserve resources for virtio-pci
Date: Thu, 16 Nov 2023 16:53:49 +0000	[thread overview]
Message-ID: <87v8a14p2c.fsf@epam.com> (raw)
In-Reply-To: <7c5f7a8d-a30c-455d-a44b-384c0f242741@xen.org>


Hi Julien,

Julien Grall <julien@xen.org> 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

  reply	other threads:[~2023-11-16 16:54 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-15 11:26 [RFC PATCH 0/6] ARM virtio-pci initial support Sergiy Kibrik
2023-11-15 11:26 ` [RFC PATCH 1/6] libxl: Pass max_vcpus to Qemu in case of PVH domain (Arm) as well Sergiy Kibrik
2023-11-15 11:26 ` [RFC PATCH 2/6] xen/public: arch-arm: reserve resources for virtio-pci Sergiy Kibrik
2023-11-15 12:33   ` Julien Grall
2023-11-15 16:51     ` Oleksandr Tyshchenko
2023-11-15 17:31       ` Julien Grall
2023-11-15 18:14         ` Oleksandr Tyshchenko
2023-11-15 18:33           ` Julien Grall
2023-11-15 19:38             ` Oleksandr Tyshchenko
2023-11-15 19:56               ` Julien Grall
2023-11-17 13:19         ` Sergiy Kibrik
2023-11-17 18:24           ` Julien Grall
2023-11-15 23:28       ` Stefano Stabellini
2023-11-16 15:07         ` Volodymyr Babchuk
2023-11-16 15:12           ` Julien Grall
2023-11-16 15:26             ` Stewart Hildebrand
2023-11-16 15:58               ` Julien Grall
2023-11-16 16:53                 ` Volodymyr Babchuk [this message]
2023-11-16 17:27                   ` Julien Grall
2023-11-16 23:04           ` Stefano Stabellini
2023-11-17  0:23             ` Volodymyr Babchuk
2023-11-17  3:31         ` Stewart Hildebrand
2023-11-17  8:11           ` Oleksandr Tyshchenko
2023-11-21 19:12             ` Stewart Hildebrand
2023-11-22  1:14               ` Stefano Stabellini
2023-11-15 11:26 ` [RFC PATCH 3/6] libxl/arm: Add basic virtio-pci support Sergiy Kibrik
2023-11-15 11:26 ` [RFC PATCH 4/6] libxl/arm: Reuse generic PCI-IOMMU bindings for virtio-pci devices Sergiy Kibrik
2023-11-15 11:26 ` [RFC PATCH 5/6] xen/arm: Intercept vPCI config accesses and forward them to emulator Sergiy Kibrik
2023-11-15 12:45   ` Julien Grall
2023-11-15 23:30     ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v8a14p2c.fsf@epam.com \
    --to=volodymyr_babchuk@epam.com \
    --cc=Oleksandr_Tyshchenko@epam.com \
    --cc=Sergiy_Kibrik@epam.com \
    --cc=bertrand.marquis@arm.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=sstabellini@kernel.org \
    --cc=stewart.hildebrand@amd.com \
    --cc=vikram.garhwal@amd.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.