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

Re: [Xen-users] Identifying graphics cards for passthrough



On 2013-04-17 11:32, Paul Stimpson wrote:
> On 15/04/13 12:39, Peter Maloney wrote:
>> On 2013-04-15 13:09, Paul Stimpson wrote:
>>> Hi Peter,
>>>>> I am already passing other PCI devices through to the guest
>>>>> successfully. Say for example 00:06:00.0.
>>>>>
>>>>> How do I write this for the conf file please. I tried things like:
>>>>>
>>>>>       gfx_passthru=1
>>>>>       pci=['0000:04:00.0','0000:04:00.1','0000:06:00.0']
>>>> # 0 is secondary passthrough; 1 is primary passthrough
>>>> gfx_passthru=0
>>>> # without the 0000: (not sure if it is a problem though)
>>>> pci=['04:00.0','04:00.1','06:00.0']
>>> I tried this (I put the other card in /etc/modprobe.d/pciback.conf to
>>> hide it) but Xen says the card is not assignable. When I run the
>>> machine up, there is what looks like Linux boot logging on the second
>>> monitor that stays there after the machine comes up.
>>>
>>> I'm obviously doing something wrong but, right now, I'm not sure what
>>> it is.
>> I'm not sure about using modprobe.d for this... modprobe would rely on
>> the device being unbound before it would work. The boot line method
>> works because nothing is bound before the boot. But modprobe would need
>> an unbind too, not just a list of devices.
>>
>> What I use is this script I wrote (which is simple to use, because you
>> don't need to edit your boot lines, or rebuild your kernel):
>> http://wiki.xen.org/wiki/Bind_lib.bash
>>
>> As it says on the top of that page, xl has this functionality built in.
>> I wrote that for xm.
>>
>>
>
> Thank you for all your help.
>
> We are using xl. I had some major progress yesterday. I did the
> following:
>
>     * echo "0000:05:00.0" >
> /sys/bus/pci/devices/0000\:05\:00.0/driver/unbind
>     * pci-assignable-add 05:00.0
>     * pci-attach Windows-guest 05:00.0
>
> The card then appeared in Windows. I had to access the VM via VNC as
> the AMD Catalyst driver has a wonderful feature that you can't install
> it unless the hardware is already in the machine and detected by the
> driver installer. It installed and, after a guest reboot, I got a
> lovely full-res Windows desktop on the right card's output.
>
> My next challenge is to make it all work automatically.
You can do this simpy by putting your attach in a pci = [...] line in
your config file, and running the pci-assignable-add before starting the
domain (xl create).

one time setup:

vim mydomu
    put pci = ... line in domain

every reboot of dom0, run this:

modprobe pciback
xl pci-assignable-add 05:00.0
xl create mydomu


Skip your unbind step because pci-assignable-add does it for you, and
even records what was previously bound so you can give it back to dom0.

> I feel like I'm making progress as I at least have it working
> manually. Was my colleague correct that adding the module to initramfs
> works or should I blow the cobwebs out of my brain and try to remember
> how to roll a custom kernel please? 
You can simply use modprobe + pci-assignable-add. Building a kernel with
xen-pciback compiled in is not necessary unless you are using the boot
line method.

_______________________________________________
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®.