[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Hiding PCI devices with modprobe.d


On Mon, Jun 17, 2013 at 5:25 AM, Daniel Shub <Daniel.Shub@xxxxxxxxxxxxxxxx> wrote:

I am running Xen 4.2 with the XL toolstack on Arch Linux. I have a set of PCI devices that I am trying to hide. From the command line I can hide the devices with


    # xl pci-assignable-add 01:00.0

    # xl pci-assignable-add 01:00.1

    # xl pci-assignable-add 02:00.0

    # xl pci-assignable-add 03:00.0


and confirm they are hidden with


    # xl pci-assignable-list


I wanted to automate this so I created a file called /etc/modprobe.d/pcihide.conf and included


    options xen-pciback hide=(01:00.0)(01.00.1)(02:00.0)(03:00.0)


When I reboot only some of the devices are hidden. Looking in dmesg and xl dmesg I can see entries for the devices that are successfully hidden, but no obvious entries for the devices that are not hidden. If I remove the /etc/modprobe.d/pcihide.conf file and reboot, no devices are hidden, so the file is getting loaded and I am able to hide some devices with this method.


I am unable to hide a built in SATA controller, two built in USB 2.0 controllers, two built in USB 3.0 controllers, and an add on SATA card with the modprobe.d file. I am able to hide two add on video cards(with HDMI audio) and a TV tuner card with the modprobe.d file. I can hide all the devices with xl pci-assignable-add.


Is using a  modprobe.d file the right way to hide PCI devices on boot? If so, I know this isn’t a lot to work with, but where should I be looking for information about what is going wrong?

I'm also using Arch Linux, with xen-4.2.2. The way I tackled this problem is moved the loading of xen-pciback into the initrd, so that it would load before any of the other modules. In order to do this, edit your /etc/mkinitcpio.conf and make the following changes:

* Add 'xen-pciback' into the MODULES array. This will make sure that the module is included in the initrd.
* Add 'modconf' into the 'HOOKS' array . This will make sure that all the files in /etc/modprobe.d/ get included in the initrd.

The only other thing I did was use the same name as the module for my modprobe.d file:

$ cat /etc/modprobe.d/xen-pciback.conf
options xen-pciback hide=(0000:06:00.1)(0000:06:00.0)(0000:00:12.2)(0000:00:12.0)



Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.