<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">I finally got my VM working with PCI
passthrough for an nVidia card and a PCI-E USB controller card.
So far, no problems. Thank you Alex for all your wonderful blog
and forum posts. The use of TightVNC was invaluable. My last
niggling problem is automating two commands:<br>
<br>
echo "0000:04:00.0" >
/sys/bus/pci/devices/0000:04:00.0/driver/unbind<br>
echo 0x1912 0x0014 > /sys/bus/pci/drivers/vfio-pci/new_id<br>
<br>
I currently type them when the host system boots. I tried putting
them in a /sbin/vfio-pci-override-usb.sh script referenced in the
/etc/dracut.conf.d/local.conf file with the line:<br>
<br>
install_items+="/sbin/vfio-pci-override-usb.sh"<br>
<br>
However, the kernel drive in use is still xhci_hcd, not vfio-pci,
as it is after invoking the above two commands. Where should
these commands go to get executed at boot? Thank you.<br>
<br>
Fred<br>
<br>
On 01/19/2016 03:21 AM, thibaut noah wrote:<br>
</div>
<blockquote
cite="mid:CANNiY3ejz+ZUmg=QYRD3SMEC-n9SYMa19iyY_7Y6jVJ7ShKrhg@mail.gmail.com"
type="cite">
<div dir="ltr">Update note, i found what prevent my card from
running, basically i need to reboot without anything plug into
the card and then i can unbind and rebind the card, what that
strange behaviour?</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2016-01-19 11:35 GMT+01:00 thibaut noah
<span dir="ltr"><<a moz-do-not-send="true"
href="mailto:thibaut.noah@gmail.com" target="_blank">thibaut.noah@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Bumping this, running <span
style="font-size:12.8px">virsh nodedev-detach
pci_0000_xx_yy_z' (with proper numbers) and/or having
managed=yes in the xml file changes nothing (actually i
had this already), ovmf still hangs waiting for i have
no idea what.<br>
Cannot run by unbinding the device through script
either, seems that i was lucky, or maybe i did something
that i forgot.<br>
Tried to add nodedev-detach to modprobe but it seems
that i did not do it in the proper way so it wasn't
working</span></div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">2016-01-16 11:30 GMT+01:00
thibaut noah <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:thibaut.noah@gmail.com"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:thibaut.noah@gmail.com">thibaut.noah@gmail.com</a></a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Didn't know libvirt was capable of
unbinding devices on its own, good to know, i'm
gonna try this and if i manage to make it work i
don't have any reason to bother myself more with
this. (note that i don't use virt-manager since
you advise me to use libvirt directly)<br>
Though the usb card will only be use by the vm,
i have more than enough usb ports on my
backpanel.<br>
<br>
Tried the gpu method by adding the id of the
device in modprobe.d after gpu's ids but it
didn't work.<br>
<br>
I paid it 50euros :(<br>
Thanks for the explanations alex<br>
<br>
</div>
<div>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2016-01-15 18:59
GMT+01:00 Alex Williamson <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:alex.williamson@redhat.com"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:alex.williamson@redhat.com">alex.williamson@redhat.com</a></a>></span>:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px
#ccc solid;padding-left:1ex">A couple
comments, first, boot time pre-binding
to vfio-pci is really<br>
only necessary for devices where the
native host drivers behave poorly<br>
if you take the device away from them
later. This is why we do it for<br>
GPUs and their companion sound device,
host GPU drivers don't like to<br>
give up the device, it plays poorly with
any sort of graphics on the<br>
host, and sequestering the audio device
prevents host tools from<br>
getting confused (and there are some
bugs in the audio driver limiting<br>
number of attach/detach cycles iirc).<br>
<br>
For anything else, you can dynamically
unbind the device from the host<br>
driver, bind it to vfio while the VM is
running, and give it back to<br>
the host on shutdown. libvirt will do
this automatically for you if<br>
your XML sets managed='yes' for the
<hostdev> device. This is the
default, so if you use virt-manager to
add the device, just select Add Hardware
-> PCI Host Device -> select
device -> Finish. Done. If for some
reason you don't want the device
flopping back and forth between host and
guest, just run 'virsh nodedev-detach
pci_0000_xx_yy_z' at bootup where
xx_yy_z is the PCI bus (xx), device
(yy), and function (z) numbers, the same
as in lspci. You can adopt some of the
GPU methods for doing this if you want
it to happen earlier as well, there are
lots of ways to do this with modprobe.d
(install options, softdep, etc..)<br>
<br>
Finally, yes I've seen OVMF hang with
some crappy USB controllers. I'm<br>
not sure if it's dependent on the
devices attached or the controller<br>
itself, but cheaper isn't always better
when it comes to selecting<br>
devices to use with device assignment.
Thanks,<br>
<br>
Alex<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
vfio-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:vfio-users@redhat.com">vfio-users@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/vfio-users">https://www.redhat.com/mailman/listinfo/vfio-users</a>
</pre>
</blockquote>
<br>
</body>
</html>