PCI Passthrough already on Boot?

Jan 9, 2012
282
2
18
Hi,

i want to passthrough a SATA-Controller to a VM, all works well so far.
But is it possible, to unbind the PCI/PCIe Device already on boot, so that the host can't see the controller at any time (as it is in ESXi)?


Alex
 
Hi,
But is it possible, to unbind the PCI/PCIe Device already on boot, so that the host can't see the controller at any time (as it is in ESXi)?

...not sure what your definition of the concept of "not seeing" the controller really is.
Passthrough is enabled by software (with hardware support needed in the background).
Even ESXi will need to "see" the device and then, somewhere down the startup sequence unbind the ESXI driver for that card (if there is any)
but it will continue to "see" the card (you can still manage vmdirectpath for it in vsphere-client).

...maybe your wish is that the host-OS/hypervisor should not load drivers for the card upon boot?
In that case you could blacklist the kernel-modules for this card.
 
...maybe your wish is that the host-OS/hypervisor should not load drivers for the card upon boot?
In that case you could blacklist the kernel-modules for this card.
-> exactly what I meant

But blacklist does not always work, for example, i have two Sata Controller (Onboard + PCIe) and both use the Kernel Driver "ahci", in this constellation i can't blacklist one.

In a different constellation i have a PCIe Sata Controller which uses a different driver (sata_sil24). The System Disk is connected to this. I want to passthrough the Onboard Controller which use the "ahci" Kernel Driver. But if i blacklist "ahci" the Driver will still be loaded!? Why?

Is there still another possibility?
 
...deleted double post due to technical problems with forum
 
Last edited:
...deleted double post due to technical problems with forum
 
Last edited:
-> exactly what I meant

But blacklist does not always work, for example, i have two Sata Controller (Onboard + PCIe) and both use the Kernel Driver "ahci", in this constellation i can't blacklist one.

...blacklist will only work for modules that are not built into the kernel image already.
My guess is, AHCI is built in and not a module.

In a different constellation i have a PCIe Sata Controller which uses a different driver (sata_sil24). The System Disk is connected to this. I want to passthrough the Onboard Controller which use the "ahci" Kernel Driver. But if i blacklist "ahci" the Driver will still be loaded!? Why?

Is there still another possibility?

...don't know but maybe modalias is something useful here: https://wiki.archlinux.org/index.php/Modalias
 
Last edited:
Update:

I tried some things:

"ahci.blacklist=yes" as Kernel Boot-Parameter works, but there is a curious notification on booting:

"Loading please wait..."
ahci: unknown parameter 'blacklist'

Strange, but it works!?


Then i tried this: https://access.redhat.com/knowledge...on_Guide/rescuemode_drivers-blacklisting.html
-> "rdblacklist=ahci" as Kernel Boot-Parameter and "blacklist ahci" in "/etc/modprobe.d/blacklist.conf"
-> does not work!

But if i change "rdblacklist" to only "blacklist", it works!?

So my solution:
-> "blacklist=ahci" as Kernel Boot-Parameter and "blacklist ahci" in "/etc/modprobe.d/blacklist.conf"