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

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

  • To: "xen-users@xxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxx>
  • From: Daniel Shub <Daniel.Shub@xxxxxxxxxxxxxxxx>
  • Date: Mon, 17 Jun 2013 22:04:40 +0100
  • Accept-language: en-US, en-GB
  • Acceptlanguage: en-US, en-GB
  • Delivery-date: Mon, 17 Jun 2013 21:06:03 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>
  • Thread-index: Ac5rZOXFW44EpuVGRqOrL3seJtIuTAANU4sP
  • Thread-topic: [Xen-users] Hiding PCI devices with modprobe.d

I have now tried a number of different solutions for hiding the PCI devices, 
but nothing is working completely. The simplest conceptually is David's 
suggestion to load the xen-pciback module in the initrd. This guarantees that 
the xen-pciback module gets loaded before any other modules have a chance to 
bind the devices. This works nearly flawlessly, except for an issue with my 
Intel integrated sound card that I am trying to hide. I am having the identical 
problem as was discussed at 
http://lists.xen.org/archives/html/xen-users/2013-05/msg00283.html where I need 
to allow the dom0 to bind the sound card and load the kernel modules before 
hiding it, otherwise I get noise and choppy playback in the domU. This means 
Ian's suggestion of recompiling the kernel and and hiding the devices with grub 
will likely not be any better.

I then tried to hide the devices later since this would allow the dom0 to bind 
the sound card. This is was basically a modification of Gordan's suggestion 
where I unbind devices with a modprobe.d conf file since. My conf file is

  install xen-pciback /root/pcidetach.sh; insmod /lib/modules/$(/bin/uname 

where I tried a number of different things in pcidetach.sh. The problem I kept 
running into is that I am running pcidetach.sh before loading the xen-pciback 
module which means I cannot hide anything. i should say that Gordan's actual 
suggestion probably would not run into this problem since he suggested 
providing the configuration to prevent other modules from binding the devices. 

I finally tried hiding the devices even later by creating a systemd udev service

  Description=PCI hide

  ExecStart=/bin/bash /root/pcihide.sh


where pcihide.sh uses the xl toolstack to hide the devices. This works, except 
it runs after the domUs in /etc/xen/auto get started. I could obviously add the 
start up of the domUs into pcihide.sh, but seems like a real hack.

My plan is to go back to hiding the devices in the initrd where I load 
explicitly load snd-intel-hda and then xen-pciback. I would need to create a 
modprobe.d conf file that can handle unbinding the sound card similar to 
Gordan's orginal suggestion. It is a little harder since I need to let it get 
bound and then unbound before loading xen-pciback. I am still open to any 

This of course would be a lot easier if the sound card issue 
(http://lists.xen.org/archives/html/xen-users/2013-05/msg00283.html) has been 
resolved. Have other people experienced the sound card problem and/or is it 
being worked on?

Thanks for all the help so far
This message and any attachment are intended solely for the addressee and may 
contain confidential information. If you have received this message in error, 
please send it back to me, and immediately delete it.   Please do not use, copy 
or disclose the information contained in this message or in any attachment.  
Any views or opinions expressed by the author of this email do not necessarily 
reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system, you 
are advised to perform your own checks. Email communications with the 
University of Nottingham may be monitored as permitted by UK legislation.

Xen-users mailing list



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