[kernel-xen] xen-pciback in 3.9.x

Gordan Bobic gordan at bobich.net
Tue May 14 06:39:42 EST 2013


On 13/05/2013 19:47, povder wrote:
> 2013/5/13 Gordan Bobic<gordan at bobich.net>:
>>
>> Have you checked that the radeon driver is blacklisted and doesn't get
>> loaded before it is detached and stubbed to xen-pciback?
>>
>
> I didn't even know that I should've blacklisted radeon driver. After
> blacklisting it in dom0 everything works fine. Thanks for your help :)

You're welcome.

Some devices (GPUs in particular) don't handle being unbound from the 
driver particularly gracefully, hence why they need to get blacklisted 
before the pciback stub driver is loaded.

If you need the driver (e.g. you have 2 ATI cards, one for dom0 and one 
for domU), you can take care of that by writing a script that detaches 
the domU GPU from the host by binding it to the xen-pciback driver 
before loading the radeon driver for the dom0 GPU.

I use this on my nvidia setup (contents of the file all on one line):

# cat /etc/modprobe.d/nvidia.conf
install nvidia /usr/local/sbin/detach-nvidia.sh; insmod 
/lib/modules/$(/bin/uname -r)/kernel/drivers/video/nvidia.ko

# cat /usr/local/sbin/detach-nvidia.sh
#!/bin/bash

modprobe xen-pciback

virsh nodedev-detach pci_0000_07_00_0
virsh nodedev-detach pci_0000_07_00_1

(replace device IDs with whatever they are on your system)

What this does is when the GPU driver is about to get auto-loaded, it 
will first load the xen-pciback driver (in the shell script) and detach 
the GPU device(s) from the host and to the xen-pciback driver. Since the 
devices are now already claimed by the pciback driver, the GPU driver 
will only claim the unclaimed GPU device.

HTH.

Gordan


More information about the kernel-xen mailing list