<div dir="ltr">For me, I usually delete this line in <device> tags<div><br></div><div><b style="color:rgb(255,0,0);font-size:14px"> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/></b><br></div><div><br></div><div>Don't delete the <address> tag inside the <source>.</div><div>I usually delete this line, this line means the virtual address that pass-throughed device will set in VM.</div><div>And it will not get error if you save XML file, it will generate automatically while VM started.</div><div>So that u don't have to worry about virtual address conflicts.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-23 4:58 GMT+08:00 Eric Griffith <span dir="ltr"><<a href="mailto:egriffith92@gmail.com" target="_blank">egriffith92@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"><br><div class="gmail_extra"><div><div class="h5"><div class="gmail_quote">On Thu, Jan 28, 2016 at 8:47 PM, Stewart Adam <span dir="ltr"><<a href="mailto:maillist@diffingo.com" target="_blank">maillist@diffingo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>On 2016-01-21 12:32 PM, Eric Griffith wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>
<br>
On Jan 17, 2016 16:10, "Stewart Adam" <<a href="mailto:maillist@diffingo.com" target="_blank">maillist@diffingo.com</a><br></span><span>
<mailto:<a href="mailto:maillist@diffingo.com" target="_blank">maillist@diffingo.com</a>>> wrote:<br>
 ><br>
 > On 2016-01-17 1:27 PM, Eric Griffith wrote:<br>
 >><br>
 >> On Jan 17, 2016 13:15, "Stewart Adam" <<a href="mailto:maillist@diffingo.com" target="_blank">maillist@diffingo.com</a><br>
<mailto:<a href="mailto:maillist@diffingo.com" target="_blank">maillist@diffingo.com</a>><br></span><div><div>
 >> <mailto:<a href="mailto:maillist@diffingo.com" target="_blank">maillist@diffingo.com</a> <mailto:<a href="mailto:maillist@diffingo.com" target="_blank">maillist@diffingo.com</a>>>> wrote:<br>
 >>  ><br>
 >>  > On 2016-01-07 11:30 AM, Eric Griffith wrote:<br>
 >>  >><br>
 >>  >> My problem is.. The Win7 (and Win8.1) guests are perfectly fine and<br>
stable<br>
 >>  >> until I try to install the amd crimson drivers. Then Windows BSODs,<br>
yelling<br>
 >>  >> about an unhandled exception. If I unpack the install and install things<br>
 >>  >> piecemeal, then I can install the HDMI audio driver, and everything else<br>
 >>  >> okay...except for the display driver. Installing the display driver<br>
causes<br>
 >>  >> the BSOD.<br>
 >>  ><br>
 >>  > How are you booting the guest (e.g. manually executing QEMU, or manually<br>
 >> created libvirt XML or virt-manager+libvirt)?<br>
 >>  ><br>
 >><br>
 >> Virt-manager+libvirt<br>
 >><br>
 >>  > I had a very similar symptom on my guest, in the end it was the guest's<br>
 >> machine flag "vmport=off" that virt-manager had added that resulted in the<br>
 >> hang/BSOD upon installation of the driver.<br>
 >><br>
 >> I tried removing the vmport=off flag but still BSOD'ed :(<br>
 >><br>
 >> > After attempting a driver install, does the guest boot correctly but hang<br>
 >> when attempting to show the login screen (i.e. when the 3D driver<br>
initializes)?<br>
 >><br>
 >> Sometimes yes, other times itd just do the boot as if I had never tried to<br>
 >> install the driver.<br>
 ><br>
 ><br>
 > Sounds like the same issue I was experiencing... Have you also added a<br>
ioh3420 device edited your configuration so that the GPU is attached to it<br>
instead the default PCI/PCIE buses? If you're not sure, please attach the<br>
output of "virsh dumpxml your-vm-name".<br>
<br>
I did not do that, I just passed through the card and the card's audio. Are<br>
there any available instructions on how to do so?<br>
<br>
Also I appreciate the pointer, Stewart :)<br>
</div></div></blockquote>
Sorry for the delay - here are those instructions:<br>
<br>
You'll want to execute 'virsh edit domname' as root to edit your domain's config file, and then add this XML after the 'pci-bridge' controller block:<br>
<br>
    <controller type='pci' index='3' model='pcie-root-port'><br>
      <model name='ioh3420'/><br>
      <target chassis='1' port='0x1'/><br>
      <alias name='pci.3'/><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1c' function='0x0' multifunction='on'/><br>
    </controller><br>
<br>
Then scroll down to the <hostdev> block for your GPU, and alter it to use the controller (bus 3) we just created:<br>
<br>
    <hostdev mode='subsystem' type='pci' managed='yes'><br>
      <driver name='vfio'/><br>
      <source><br>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/><br>
      </source><br>
      <alias name='hostdev0'/><br>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0' multifunction='on'/><br>
    </hostdev><br>
<br>
Regards,<br>
Stewart<br>
</blockquote></div><br></div></div><div><div><div>Hey Stewart, 
long time no talk. Sorry about the delaying in getting back to you on 
this topic, classes really kicking into high gear and life became kind 
of crazy.<br><br></div>Copy pasted below is the dumpxml of my Win8.1 VM.
 I tried to add in the two code blocks that you linked above, but I got 
errors when I did so. I've bolded and marked in red where I added the 
first code block, the pci definition, and then did the same for the two 
devices that make up my GPU. <br><br></div><div>Edit: just incase anyone's mail client doesn't like the bold / text color change, I've also off-set the area by adding a blank line. <br></div><div><br></div>XML WALL OF TEXT: <br><br><domain type='kvm'><br>  <name>win8.1</name><br>  <uuid>(UUID)</uuid><br>  <memory unit='KiB'>4194304</memory><br>  <currentMemory unit='KiB'>4194304</currentMemory><br>  <vcpu placement='static'>2</vcpu><br>  <os><br>    <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type><br>    <loader readonly='yes' type='pflash'>/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd</loader><br>    <nvram>/var/lib/libvirt/qemu/nvram/win8.1_VARS.fd</nvram><br>  </os><br>  <features><br>    <acpi/><br>    <apic/><br>    <hyperv><br>      <relaxed state='on'/><br>      <vapic state='on'/><br>      <spinlocks state='on' retries='8191'/><br>    </hyperv><br>  </features><br>  <cpu mode='custom' match='exact'><br>    <model fallback='allow'>core2duo</model><br>  </cpu><br>  <clock offset='localtime'><br>    <timer name='rtc' tickpolicy='catchup'/><br>    <timer name='pit' tickpolicy='delay'/><br>    <timer name='hpet' present='no'/><br>    <timer name='hypervclock' present='yes'/><br>  </clock><br>  <on_poweroff>destroy</on_poweroff><br>  <on_reboot>restart</on_reboot><br>  <on_crash>restart</on_crash><br>  <pm><br>    <suspend-to-mem enabled='no'/><br>    <suspend-to-disk enabled='no'/><br>  </pm><br>  <devices><br>    <emulator>/usr/bin/qemu-kvm</emulator><br>    <disk type='file' device='cdrom'><br>      <driver name='qemu' type='raw'/><br>      <source file='/usr/share/virtio-win/virtio-win-0.1.102.iso'/><br>      <target dev='sda' bus='sata'/><br>      <readonly/><br>      <boot order='3'/><br>      <address type='drive' controller='0' bus='0' target='0' unit='0'/><br>    </disk><br>    <disk type='file' device='disk'><br>      <driver name='qemu' type='qcow2'/><br>      <source file='/var/lib/libvirt/images/win8.1.qcow2'/><br>      <target dev='sdb' bus='sata'/><br>      <boot order='1'/><br>      <address type='drive' controller='0' bus='0' target='0' unit='1'/><br>    </disk><br>    <disk type='file' device='cdrom'><br>      <driver name='qemu' type='raw'/><br>      <source file='/var/lib/libvirt/images/Win8.1_English_x64.iso'/><br>      <target dev='sdc' bus='sata'/><br>      <readonly/><br>      <boot order='2'/><br>      <address type='drive' controller='0' bus='0' target='0' unit='2'/><br>    </disk><br>    <controller type='usb' index='0' model='ich9-ehci1'><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/><br>    </controller><br>    <controller type='usb' index='0' model='ich9-uhci1'><br>      <master startport='0'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/><br>    </controller><br>    <controller type='usb' index='0' model='ich9-uhci2'><br>      <master startport='2'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/><br>    </controller><br>    <controller type='usb' index='0' model='ich9-uhci3'><br>      <master startport='4'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/><br>    </controller><br><br></div><span style="color:rgb(255,0,0)"><b><!-- ADDED PCI BLOCK HERE --></b></span><br><div><br>    <controller type='pci' index='0' model='pci-root'/><br>    <controller type='sata' index='0'><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/><br>    </controller><br>    <controller type='virtio-serial' index='0'><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/><br>    </controller><br>    <interface type='network'><br>      <mac address='52:54:00:7d:c6:85'/><br>      <source network='default'/><br>      <model type='virtio'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/><br>    </interface><br>    <serial type='pty'><br>      <target port='0'/><br>    </serial><br>    <console type='pty'><br>      <target type='serial' port='0'/><br>    </console><br>    <channel type='spicevmc'><br>      <target type='virtio' name='com.redhat.spice.0'/><br>      <address type='virtio-serial' controller='0' bus='0' port='1'/><br>    </channel><br>    <input type='tablet' bus='usb'/><br>    <sound model='ich9'><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/><br>    </sound><br><br> <span style="color:rgb(255,0,0)">   <b><hostdev mode='subsystem' type='pci' managed='yes'><span class=""><span><br>      <source><br>        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/><br>      </source><br></span></span>      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/><br>    </hostdev><span class=""><span><br>    <hostdev mode='subsystem' type='pci' managed='yes'><br></span></span>      <source><br>        <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/><br>      </source><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/><br>    </hostdev><br><br></b></span>    <hostdev mode='subsystem' type='usb' managed='yes'><br>      <source><br>        <vendor id='0x24f0'/><br>        <product id='0x0140'/><br>      </source><br>    </hostdev><br>    <hostdev mode='subsystem' type='usb' managed='yes'><br>      <source><br>        <vendor id='0x046d'/><br>        <product id='0xc52b'/><br>      </source><br>    </hostdev><br>    <hostdev mode='subsystem' type='usb' managed='yes'><br>      <source><br>        <vendor id='0x0a5c'/><br>        <product id='0x21e8'/><br>      </source><br>    </hostdev><br>    <redirdev bus='usb' type='spicevmc'><br>    </redirdev><br>    <redirdev bus='usb' type='spicevmc'><br>    </redirdev><br>    <memballoon model='virtio'><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/><br>    </memballoon><br>  </devices><br></domain><br><br><br></div><div>Adding
 them in was no problem in and of itself, it was saving it that caused a problem. Virsh didn't like those two definitions. Editing the 
"address type=pci" lines of both, and changing THOSE bus= definitions to
 say 0x03, instead of 0x00 gives me this error: <br><br>error: XML error: Invalid PCI address 0000:03:07.0. slot must be <= 0<br><br><br></div><div>Editing the one above it, the "address domain=" line, and changing the bus from 0x01 to 0x03 gives me this error: <br></div><div><br>error: XML error: The device information for 0000:00:1c.0 has no PCI connection types listed<br><br><br></div>Any thoughts?<br><br></div><div class="gmail_extra">Half tempted to say 'screw it' and just hold off on doing a VFIO setup until I snag an Nvidia Polaris card later this year >< <br></div></div>
<br>_______________________________________________<br>
vfio-users mailing list<br>
<a href="mailto:vfio-users@redhat.com">vfio-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/vfio-users</a><br>
<br></blockquote></div><br></div>