On Thu, Feb 05, 2026 at 11:18:10PM +0100, Marek Marczykowski-Górecki wrote: > On Wed, Feb 04, 2026 at 09:02:47AM +0000, Daniel P. Berrangé via Devel wrote:
> > > In addition to that, a thread in 2017 (this mailing list) seems to > > > indicate > > > that this part of the code may not be necessary: > > > https://lists.libvirt.org/archives/list/[email protected]/thread/QRI4L5YFGBAV7NCTJ5OOJ7GBYGHQ7WZQ/#K5WRR6WTAUEPRQBWJVJSMX554DTYFTYH. > > > > > > My question: can someone that knows this part of the code have a look to > > > see > > > what is the best way to correct it: either propose a patch to > > > `virPCIDeviceIsBehindSwitchLackingACS` that is more generic or to change > > > the > > > rest of the code so it's no more used? > > > > ....That thread certainly suggests we have a large set of code that can > > be purged. Libvirt only needs to support the 2 most recent releases of > > each distro, and since the kerenl removed legacy device assignment 8 > > years ago I see no reason for us to keep this. > > IIUC that thread is talking about KVM only. Here we have Xen. I'm not > sure what "legacy assignment" is in the KVM world, but I don't think > there were any changes in this API on Xen side in the last decade or so. > > Theoretically, checks like this should be done by Xen (either libxl, or > the hypervisor itself). But in practice, libvirt does it more > comprehensively and provides better error messages (when it works). Yep, I completely overlooked that this was using Xen, and Xen does not support VFIO like KVM does. So we do indeed need to retain this logic, and fix any bugs. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
