From: Anthony PERARD via <qemu-devel@nongnu.org>
To: Chuck Zmudzinski <brchuckz@aol.com>
Cc: <xen-devel@lists.xenproject.org>, Wei Liu <wl@xen.org>,
Juergen Gross <jgross@suse.com>, <qemu-devel@nongnu.org>
Subject: Re: [XEN PATCH v2 0/3] Configure qemu upstream correctly by default for igd-passthru
Date: Wed, 25 Jan 2023 11:37:14 +0000 [thread overview]
Message-ID: <Y9EUarVVWr223API@perard.uk.xensource.com> (raw)
In-Reply-To: <cover.1673300848.git.brchuckz@aol.com>
On Tue, Jan 10, 2023 at 02:32:01AM -0500, Chuck Zmudzinski wrote:
> I call attention to the commit message of the first patch which points
> out that using the "pc" machine and adding the xen platform device on
> the qemu upstream command line is not functionally equivalent to using
> the "xenfv" machine which automatically adds the xen platform device
> earlier in the guest creation process. As a result, there is a noticeable
> reduction in the performance of the guest during startup with the "pc"
> machne type even if the xen platform device is added via the qemu
> command line options, although eventually both Linux and Windows guests
> perform equally well once the guest operating system is fully loaded.
There shouldn't be a difference between "xenfv" machine or using the
"pc" machine while adding the "xen-platform" device, at least with
regards to access to disk or network.
The first patch of the series is using the "pc" machine without any
"xen-platform" device, so we can't compare startup performance based on
that.
> Specifically, startup time is longer and neither the grub vga drivers
> nor the windows vga drivers in early startup perform as well when the
> xen platform device is added via the qemu command line instead of being
> added immediately after the other emulated i440fx pci devices when the
> "xenfv" machine type is used.
The "xen-platform" device is mostly an hint to a guest that they can use
pv-disk and pv-network devices. I don't think it would change anything
with regards to graphics.
> For example, when using the "pc" machine, which adds the xen platform
> device using a command line option, the Linux guest could not display
> the grub boot menu at the native resolution of the monitor, but with the
> "xenfv" machine, the grub menu is displayed at the full 1920x1080
> native resolution of the monitor for testing. So improved startup
> performance is an advantage for the patch for qemu.
I've just found out that when doing IGD passthrough, both machine
"xenfv" and "pc" are much more different than I though ... :-(
pc_xen_hvm_init_pci() in QEMU changes the pci-host device, which in
turns copy some informations from the real host bridge.
I guess this new host bridge help when the firmware setup the graphic
for grub.
> I also call attention to the last point of the commit message of the
> second patch and the comments for reviewers section of the second patch.
> This approach, as opposed to fixing this in qemu upstream, makes
> maintaining the code in libxl__build_device_model_args_new more
> difficult and therefore increases the chances of problems caused by
> coding errors and typos for users of libxl. So that is another advantage
> of the patch for qemu.
We would just needs to use a different approach in libxl when generating
the command line. We could probably avoid duplications. I was hopping to
have patch series for libxl that would change the machine used to start
using "pc" instead of "xenfv" for all configurations, but based on the
point above (IGD specific change to "xenfv"), then I guess we can't
really do anything from libxl to fix IGD passthrough.
> OTOH, fixing this in qemu causes newer qemu versions to behave
> differently than previous versions of qemu, which the qemu community
> does not like, although they seem OK with the other patch since it only
> affects qemu "xenfv" machine types, but they do not want the patch to
> affect toolstacks like libvirt that do not use qemu upstream's
> autoconfiguration options as much as libxl does, and, of course, libvirt
> can manage qemu "xenfv" machines so exising "xenfv" guests configured
> manually by libvirt could be adversely affected by the patch to qemu,
> but only if those same guests are also configured for igd-passthrough,
> which is likely a very small number of possibly affected libvirt users
> of qemu.
>
> A year or two ago I tried to configure guests for pci passthrough on xen
> using libvirt's tool to convert a libxl xl.cfg file to libvirt xml. It
> could not convert an xl.cfg file with a configuration item
> pci = [ "PCI_SPEC_STRING", "PCI_SPEC_STRING", ...] for pci passthrough.
> So it is unlikely there are any users out there using libvirt to
> configure xen hvm guests for igd passthrough on xen, and those are the
> only users that could be adversely affected by the simpler patch to qemu
> to fix this.
FYI, libvirt should be using libxl to create guest, I don't think there
is another way for libvirt to create xen guests.
So overall, unfortunately the "pc" machine in QEMU isn't suitable to do
IGD passthrough as the "xenfv" machine has already some workaround to
make IGD work and just need some more.
I've seen that the patch for QEMU is now reviewed, so I look at having
it merged soonish.
Thanks,
--
Anthony PERARD
next prev parent reply other threads:[~2023-01-25 11:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1673300848.git.brchuckz.ref@aol.com>
2023-01-09 23:08 ` [XEN PATCH 0/3] Configure qemu upstream correctly by default for igd-passthru Chuck Zmudzinski
2023-01-09 23:08 ` [XEN PATCH 1/3] libxl/dm: Use "pc" machine type for Intel IGD passthrough Chuck Zmudzinski
2023-01-10 7:32 ` [XEN PATCH v2 " Chuck Zmudzinski
2023-01-09 23:08 ` [XEN PATCH 2/3] libxl/dm: Manage pci slot assignment " Chuck Zmudzinski
2023-01-10 7:32 ` [XEN PATCH v2 " Chuck Zmudzinski
2023-01-09 23:08 ` [XEN PATCH 3/3] libxl/dm: Assign slot 2 by default " Chuck Zmudzinski
2023-01-10 7:32 ` [XEN PATCH v2 " Chuck Zmudzinski
2023-01-10 7:32 ` [XEN PATCH v2 0/3] Configure qemu upstream correctly by default for igd-passthru Chuck Zmudzinski
2023-01-25 11:37 ` Anthony PERARD via [this message]
2023-01-25 20:20 ` Chuck Zmudzinski
2023-01-25 23:19 ` Chuck Zmudzinski
2023-01-30 0:38 ` Chuck Zmudzinski
2023-01-31 19:35 ` 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=Y9EUarVVWr223API@perard.uk.xensource.com \
--to=qemu-devel@nongnu.org \
--cc=anthony.perard@citrix.com \
--cc=brchuckz@aol.com \
--cc=jgross@suse.com \
--cc=wl@xen.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).