From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Zhang, Julia" <Julia.Zhang@amd.com>
Cc: "Chen, Jiqian" <Jiqian.Chen@amd.com>,
"Zhu, Lingshan" <Lingshan.Zhu@amd.com>,
"Huang, Ray" <Ray.Huang@amd.com>,
Matias Ezequiel Vara Larsen <mvaralar@redhat.com>,
"virtio-comment@lists.linux.dev" <virtio-comment@lists.linux.dev>,
Parav Pandit <parav@nvidia.com>
Subject: Re: [PATCH v2 1/1] virtio-gpu: get p2pdma distance
Date: Wed, 19 Mar 2025 08:23:02 -0400 [thread overview]
Message-ID: <20250319080936-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <IA1PR12MB653225F6373D8337181B649EF2D92@IA1PR12MB6532.namprd12.prod.outlook.com>
On Wed, Mar 19, 2025 at 10:45:14AM +0000, Zhang, Julia wrote:
> >>> Can you explain more details about how to let
> >>> guest discover the way PCI driver discovers in physical world?
> >>>
> >> This is QEMU or VMM level implementation question on how to build the synthetic topology.
> >> In libvirt and other places, there is a way to describe the PCI level BDF etc details.
> >> You might want to check with the right owners on how to achieve or extend it.
> >
> > Hi MST,
> > As discussed above, Parav suggested to rebuild PCI topology in QEMU
> > level to make virtual PCI topology 100% same as physical PCI topology so
> > that we can get accurate p2pdma_distance from guest directly. Since you
> > are one of the maintainers of QEMU, can you give us some suggestions or
> > explain more details about how to achieve it?
> >
> > Thanks,
> > Julia
>
> Hi MST,
> Since Parav thinks I should rebuild PCI topology in QEMU to make it 100%
> same as physical PCI topology, which I think will be a big change for
> virtual PCI. Can you give us some suggestions please?
>
> Thanks,
> Julia
Hi Julia,
I feel the issue is not "100% matching" or the specific interface, but
that the motivation for the patches is not documented sufficiently
clearly.
It is true that many hypervisor vendors have a preference to utilizing native
interfaces, since this reduces the amount of guest code to maintain.
Remember, that guest code has to be implemented for every OS.
Further, duplicating e.g. ACPI information at the device level
means that baremetal and VM guest behaviour use different drivers,
which increases support and testing load.
I also note that the admin command infrastructure was designed with
use-cases where one device describes other devices.
Having said all that, it's not a religious argument, and might be reasonable
e.g. if the infrastructure is reusable to address a lot of other
problems.
Generally, one way to move things forward would be to show an example:
- a baremetal instance which has the issue
- how is the distance discovered on baremetal
- how would a minimal emulation of baremetal look like
- why is this hard
Hope this helps,
--
MST
next prev parent reply other threads:[~2025-03-19 12:23 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 9:27 [PATCH v2 1/1] virtio-gpu: get p2pdma distance Julia Zhang
2025-02-26 10:44 ` Matias Ezequiel Vara Larsen
2025-02-26 10:51 ` Parav Pandit
2025-03-05 10:41 ` Zhang, Julia
2025-03-06 4:29 ` Parav Pandit
2025-03-06 7:16 ` Zhang, Julia
2025-03-10 3:48 ` Parav Pandit
2025-03-10 7:37 ` Zhang, Julia
2025-03-10 10:18 ` Parav Pandit
2025-03-11 3:27 ` Zhang, Julia
2025-03-11 4:00 ` Parav Pandit
2025-03-11 7:29 ` Zhang, Julia
2025-03-11 15:14 ` Parav Pandit
2025-03-12 6:20 ` Zhang, Julia
2025-03-12 10:11 ` Parav Pandit
2025-03-13 3:31 ` Zhang, Julia
2025-03-14 2:15 ` Parav Pandit
2025-03-14 3:02 ` Zhang, Julia
2025-03-19 10:45 ` Zhang, Julia
2025-03-19 12:23 ` Michael S. Tsirkin [this message]
2025-03-20 10:00 ` Zhang, Julia
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=20250319080936-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=Jiqian.Chen@amd.com \
--cc=Julia.Zhang@amd.com \
--cc=Lingshan.Zhu@amd.com \
--cc=Ray.Huang@amd.com \
--cc=mvaralar@redhat.com \
--cc=parav@nvidia.com \
--cc=virtio-comment@lists.linux.dev \
/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.