From: Anthony PERARD <anthony.perard@citrix.com> To: Chuck Zmudzinski <brchuckz@aol.com> Cc: Alex Williamson <alex.williamson@redhat.com>, Paul Durrant <paul@xen.org>, "Michael S. Tsirkin" <mst@redhat.com>, Stefano Stabellini <sstabellini@kernel.org>, Paolo Bonzini <pbonzini@redhat.com>, "Richard Henderson" <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, <xen-devel@lists.xenproject.org>, <qemu-devel@nongnu.org> Subject: Re: [PATCH v6] xen/pt: reserve PCI slot 2 for Intel igd-passthru Date: Fri, 6 Jan 2023 10:52:54 +0000 [thread overview] Message-ID: <Y7f9hi0SqYk6KQzW@perard.uk.xensource.com> (raw) In-Reply-To: <ba4f8fd6-ae10-da60-7ef5-66782f29fdb9@aol.com> On Tue, Jan 03, 2023 at 05:58:01PM -0500, Chuck Zmudzinski wrote: > Hello Anthony and Paul, Hi Chuck, > I am requesting your feedback to Alex Williamson's suggestion that this > problem with assigning the correct slot address to the igd on xen should > be fixed in libxl instead of in qemu. > > It seems to me that the xen folks and the kvm folks have two different > philosophies regarding how a tool stack should be designed. kvm/libvirt > provides much greater flexibility in configuring the guest which puts > the burden on the administrator to set all the options correctly for > a given feature set, while xen/xenlight does not provide so much > flexibility and tries to automatically configure the guest based on > a high-level feature option such as the igd-passthrough=on option that > is available for xen guests using qemu but not for kvm guests using > qemu. > > What do you think? Should libxl be patched instead of fixing the problem > with this patch to qemu, which is contrary to Alex's suggestion? I do think that libxl should be able to deal with having to put a graphic card on slot 2. QEMU already provides every API necessary for a toolstack to be able to start a Xen guest with all the PCI card in the right slot. But it would just be a bit more complicated to implement in libxl. At the moment, libxl makes use of the QEMU machine 'xenfv', libxl should instead start to use the 'pc' machine and add the "xen-platform" pci device. (libxl already uses 'pc' when the "xen-platform" pci card isn't needed.) Also probably add the other pci devices to specific slot to be able to add the passthrough graphic card at the right slot. Next is to deal with migration when using the 'pc' machine, as it's just an alias to a specific version of the machine. We need to use the same machine on the receiving end, that is start with e.g. "pc-i440fx-7.1" if 'pc' was an alias for it at guest creation. I wonder if we can already avoid to patch the 'xenfv' machine with some xl config: # avoid 'xenfv' machine and use 'pc' instead xen_platform_pci=0 # add xen-platform pci device back device_model_args_hvm = [ "-device", "xen-platform,addr=3", ] But there's probably another device which is going to be auto-assigned to slot 2. If you feel like dealing with the technical dept in libxl, that is to stop using 'xenfv' and use 'pc' instead, then go for it, I can help with that. Otherwise, if the patch to QEMU only changes the behavior of the 'xenfv' machine then I think I would be ok with it. I'll do a review of that QEMU patch in another email. Cheers, -- Anthony PERARD
WARNING: multiple messages have this Message-ID (diff)
From: Anthony PERARD via <qemu-devel@nongnu.org> To: Chuck Zmudzinski <brchuckz@aol.com> Cc: Alex Williamson <alex.williamson@redhat.com>, Paul Durrant <paul@xen.org>, "Michael S. Tsirkin" <mst@redhat.com>, Stefano Stabellini <sstabellini@kernel.org>, Paolo Bonzini <pbonzini@redhat.com>, "Richard Henderson" <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, <xen-devel@lists.xenproject.org>, <qemu-devel@nongnu.org> Subject: Re: [PATCH v6] xen/pt: reserve PCI slot 2 for Intel igd-passthru Date: Fri, 6 Jan 2023 10:52:54 +0000 [thread overview] Message-ID: <Y7f9hi0SqYk6KQzW@perard.uk.xensource.com> (raw) In-Reply-To: <ba4f8fd6-ae10-da60-7ef5-66782f29fdb9@aol.com> On Tue, Jan 03, 2023 at 05:58:01PM -0500, Chuck Zmudzinski wrote: > Hello Anthony and Paul, Hi Chuck, > I am requesting your feedback to Alex Williamson's suggestion that this > problem with assigning the correct slot address to the igd on xen should > be fixed in libxl instead of in qemu. > > It seems to me that the xen folks and the kvm folks have two different > philosophies regarding how a tool stack should be designed. kvm/libvirt > provides much greater flexibility in configuring the guest which puts > the burden on the administrator to set all the options correctly for > a given feature set, while xen/xenlight does not provide so much > flexibility and tries to automatically configure the guest based on > a high-level feature option such as the igd-passthrough=on option that > is available for xen guests using qemu but not for kvm guests using > qemu. > > What do you think? Should libxl be patched instead of fixing the problem > with this patch to qemu, which is contrary to Alex's suggestion? I do think that libxl should be able to deal with having to put a graphic card on slot 2. QEMU already provides every API necessary for a toolstack to be able to start a Xen guest with all the PCI card in the right slot. But it would just be a bit more complicated to implement in libxl. At the moment, libxl makes use of the QEMU machine 'xenfv', libxl should instead start to use the 'pc' machine and add the "xen-platform" pci device. (libxl already uses 'pc' when the "xen-platform" pci card isn't needed.) Also probably add the other pci devices to specific slot to be able to add the passthrough graphic card at the right slot. Next is to deal with migration when using the 'pc' machine, as it's just an alias to a specific version of the machine. We need to use the same machine on the receiving end, that is start with e.g. "pc-i440fx-7.1" if 'pc' was an alias for it at guest creation. I wonder if we can already avoid to patch the 'xenfv' machine with some xl config: # avoid 'xenfv' machine and use 'pc' instead xen_platform_pci=0 # add xen-platform pci device back device_model_args_hvm = [ "-device", "xen-platform,addr=3", ] But there's probably another device which is going to be auto-assigned to slot 2. If you feel like dealing with the technical dept in libxl, that is to stop using 'xenfv' and use 'pc' instead, then go for it, I can help with that. Otherwise, if the patch to QEMU only changes the behavior of the 'xenfv' machine then I think I would be ok with it. I'll do a review of that QEMU patch in another email. Cheers, -- Anthony PERARD
next prev parent reply other threads:[~2023-01-06 10:53 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <830263507e8f1a24a94f81909d5102c4b204e938.1672615492.git.brchuckz.ref@aol.com> 2023-01-01 23:52 ` [PATCH v6] xen/pt: reserve PCI slot 2 for Intel igd-passthru Chuck Zmudzinski 2023-01-02 17:46 ` Michael S. Tsirkin 2023-01-02 23:10 ` Chuck Zmudzinski 2023-01-03 15:14 ` Alex Williamson 2023-01-03 21:50 ` Chuck Zmudzinski 2023-01-03 22:58 ` Chuck Zmudzinski 2023-01-06 10:52 ` Anthony PERARD [this message] 2023-01-06 10:52 ` Anthony PERARD via 2023-01-06 14:02 ` Chuck Zmudzinski 2023-01-04 20:47 ` Chuck Zmudzinski 2023-01-05 21:20 ` Chuck Zmudzinski 2023-01-03 18:38 ` Chuck Zmudzinski 2023-01-06 13:00 ` Michael S. Tsirkin 2023-01-06 14:03 ` Anthony PERARD via 2023-01-06 14:03 ` Anthony PERARD 2023-01-06 14:10 ` Chuck Zmudzinski 2023-01-06 14:31 ` Chuck Zmudzinski 2023-01-06 15:02 ` Chuck Zmudzinski 2023-01-08 16:01 ` Chuck Zmudzinski 2023-01-06 14:42 ` Anthony PERARD via 2023-01-06 14:42 ` Anthony PERARD 2023-01-21 18:06 ` Chuck Zmudzinski 2023-01-22 1:09 ` Chuck Zmudzinski
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=Y7f9hi0SqYk6KQzW@perard.uk.xensource.com \ --to=anthony.perard@citrix.com \ --cc=alex.williamson@redhat.com \ --cc=brchuckz@aol.com \ --cc=eduardo@habkost.net \ --cc=marcel.apfelbaum@gmail.com \ --cc=mst@redhat.com \ --cc=paul@xen.org \ --cc=pbonzini@redhat.com \ --cc=qemu-devel@nongnu.org \ --cc=richard.henderson@linaro.org \ --cc=sstabellini@kernel.org \ --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: linkBe 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.