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

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



On Mon, 17 Jun 2013 11:25:01 +0100, 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?

You'll find the answer and an example here:

https://lists.wireless.org.au/pipermail/kernel-xen/2013-May/000241.html

You will need to modify it for your setup (virsh vs. xm vs. xl),
but it should give you the right idea about what to do, and how
to make sure the drivers are unbound before you need to use them.

In a nutshell - xen-pciback will not unbind drivers that are already
bound to hardware - it will only bind itself to the devices you
listed if nothing else has claimed them already. So you need
to create an install script for each of the driver modules
that intercepts the load and does the required unbinding work.

If a particular kernel driver module handles only the hardware
you want to pass through, you can just blacklist that module
and skip the intercept for it. You only need the intercept if
you have multiple pieces of similar hardware handled by the
same driver and you need to some of it in the dom0. Otherwise
you might as well just blacklist the driver.

Gordan

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

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