On Tue, 11 Oct 2016 22:09:06 -0700 Muted Bytes <mutedby...@gmail.com> wrote:
> I have recently installed an AMD card for my host system, and my vm > guest is also using an AMD card. On the host, I am using radeon driver > but would like to prevent the guest getting radeon loaded. With > pci-stub, with it built-in to the kernel, it would always grab pci > devices before any other driver got the chance. However, with vfio-pci > it seems to be loaded much later in the boot process, so radeon gets > both cards before vfio-pci can bind it. As a result, I have tried > building vfio and vfio-pci as modules and then including them in a > Dracut-created initramfs as detailed at > https://vfio.blogspot.com/2015/05/vfio-gpu-how-to-series-part-3-host.html. > Even doing this, vfio-pci still gets loaded as late as it was built-in > to the kernel, and so it does not get loaded before radeon (which is > built-in). > > Is there a way to get vfio-pci loaded earlier? Do I need to just build > radeon as module to hope it gets loaded later also? If radeon is built-in, you're causing your own problems. There is no way to get a module to load prior to a built-in driver. Even ordering of built-in drivers is based on link ordering. This is part of why we use modules. Modules are a good thing. I'd guess your only hope is to have pci-stub built-in and hope the link order lets it probe the devices first, then sort out later how to get the correct devices bound to vfio-pci vs radeon. Thanks, Alex _______________________________________________ vfio-users mailing list vfio-users@redhat.com https://www.redhat.com/mailman/listinfo/vfio-users