Passthrough Contention Problems with Console and Linux VM
-
Has anyone had success in making PCI passthrough work to a Linux Desktop VM (in particular Hyprland)?
I am getting very mixed results but generally a lot of issues where there seams to be Seat contention for my USB devices (keyboard/mouse) and my GPU vs the Console (Cirrus VGA Driver/Virtual Input Devices).
I've been working through a series of blacklist and priority settings (mostly ChatGPT generated sadly) but was wondering if there is a more standard approach to this that someone knows/has figured out.
I can't imagine it's as hard as I'm making it so hoping one of your experts can help me here as I'm brand new to XCPNG!
Thank you!
-
Hi,
The virtual console is slow because of the Cirrus VGA driver. We have some changes in the pipes that might improve it. I'm adding @TeddyAstie in the convo so he could give you some test packages to see if it's better
-
@olivierlambert great thank you. I think there is a Git issue also I found today 744. Not directly related but also driver related where the VGA disable function doesnβt work.
I think if in whatever future driver implementation there can be some more control of how it binds it would be really helpful for these use cases.
Thank you!
-
We'll release at some point an update where you could switch to a new VGA type (virtio-vga) which is a LOT faster and allow better resolutions for the VM console. We have test packages in the next days if you want to provide some feedback,
-
@olivierlambert yes please
-
@TeddyAstie will post them when he fixed some basic bugs
-
@olivierlambert yes happy to test as well thank you!
-
@DustinB said in Passthrough Contention Problems with Console and Linux VM:
@olivierlambert yes please
It's something we're still evaluating, and there are known bugs (including some for unknown reasons).
There are still rough edges, not everything works perfectly; but it's somewhat there.What works (tested) :
- UEFI guests (OVMF knows how to drive virtio-gpu devices)
- Linux operating systems with virtio-gpu drivers
- High resolutions
What doesn't work :
- VGA compatibility mode doesn't work properly
- BIOS guests have no display at least at the beginning
- operating systems without virtio-gpu drivers may or may not work properly (e.g Windows without appropriate drivers), but that still wants to be tested
- cursor integration is a bit limited in Xen Orchestra (may not match guest cursor icon); but at least you don't see duplicate cursors
To test it (not production ready)
# Download repo file for XCP-ng 8.3 wget https://koji.xcp-ng.org/repos/user/8/8.3/xcpng-users.repo -O /etc/yum.repos.d/xcpng-users.repo yum update --enablerepo=xcp-ng-tae1
you should see virtiovga packages for QEMU and Xapi.
Then, you set virtio-vga for your VM.
xe vm-param-set uuid=GUEST_UUID platform:vga=virtio
(or vm-param-add depending on whether or not the parameter has been set previously)
Regarding Windows support; KVM VirtIO drivers provides a "virito-gpu DoD" which should work (tested with upstream Xen, but not yet with XCP-ng).
-
@TeddyAstie great will take a look this weekend. Is there anything in particular you want us to test / check out?
-
@chicagomed said in Passthrough Contention Problems with Console and Linux VM:
@TeddyAstie great will take a look this weekend. Is there anything in particular you want us to test / check out?
What works/doesn't work and overall performance.