[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH v2 0/3] Configure qemu upstream correctly by default for igd-passthru
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |