<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
<style>
div.plaintext { white-space: normal; }
body { font-family: sans-serif; }
div.plaintext h1 { font-size: 1.4em; }
div.plaintext h2 { font-size: 1.2em; }
div.plaintext h3 { font-size: 1.1em; }
blockquote.embedded,div.plaintext blockquote { margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777; }
blockquote.embedded blockquote.embedded,div.plaintext blockquote blockquote { border-left-color: #999999; color: #999999; }
blockquote.embedded blockquote.embedded blockquote.embedded,div.plaintext blockquote blockquote blockquote { border-left-color: #BBBBBB; color: #BBBBBB; }
div.plaintext a { color: #3983C4 }
blockquote.embedded,div.plaintext blockquote a { color: #777777; }
blockquote.embedded blockquote.embedded,div.plaintext blockquote blockquote a { color: #999999; }
blockquote.embedded blockquote.embedded blockquote.embedded,div.plaintext blockquote blockquote blockquote a { color: #BBBBBB; }
div.plaintext math[display="inline"] > mrow { padding:5px; }
div.plaintext div.footnotes li p { margin: 0.2em 0; }
</style>
</head>
<body>
<div class="plaintext"><p dir="auto"> <memballoon model='none'/></p>
<p dir="auto">Might perform better. </p>
<p dir="auto">Also, yes Hugepages might be helpful too.</p>
<p dir="auto">Also, would you mind observing whether interrupts are posted when the GPU is in use in pass-through?</p>
<p dir="auto">watch -d cat /proc/interrupts</p>
<p dir="auto">Look at the bottom for PIN (Posted-interrupt notification event) and PIW (Posted-interrupt wakeup event).</p>
<p dir="auto">Thanks!</p>
<p dir="auto">On 30 Mar 2017, at 15:46, Graham Neville wrote:</p>
</div>
<blockquote class="embedded"><div dir="ltr"><div>Finally gotten to the bottom of this, this the help of your XML file I'm able to run with a Q35 setup, I'm also able to just passthrough the CPU features. Thanks.</div><div><br></div><div>I discovered the issue with the guest crashing was actually due to my graphics card overheating! Noticed that it was hitting 99C and then guest would crash.</div><div><br></div><div>The setup is pretty sweet now, I just want to change my drives from sata to virtio which I believe will be quicker. Then also investigate HugePages<br></div><div><br></div><div>Here's my Kernel params:<br></div><div><br></div><div>cat /proc/cmdline<br>BOOT_IMAGE=/vmlinuz-linux root=UUID=bf69add2-e36f-453a-b92e-a4343ca20d26 rw quiet amd_iommu=on vfio-pci.ids=1002:67b1,1002:aac8 video=efifb:off isolcpus=0-7<br></div><div><br></div><div>Here's my final XML file:</div><div><br></div><div><domain type='kvm'><br>  <name>Windows10</name><br>  <uuid>d45c3b5f-be8a-41e8-a22c-02e91c4c6245</uuid><br>  <memory unit='KiB'>8388608</memory><br>  <currentMemory unit='KiB'>8388608</currentMemory><br>  <vcpu placement='static'>4</vcpu><br>  <cputune><br>    <vcpupin vcpu='0' cpuset='0'/><br>    <vcpupin vcpu='1' cpuset='1'/><br>    <vcpupin vcpu='2' cpuset='2'/><br>    <vcpupin vcpu='3' cpuset='3'/><br>  </cputune><br>  <os><br>    <type arch='x86_64' machine='pc-q35-2.6'>hvm</type><br>    <loader readonly='yes' type='pflash'>/home/virtualguests/windows10/ovmf_code_x64.bin</loader><br>    <nvram>/home/virtualguests/windows10/ovmf_vars_x64.bin</nvram><br>    <boot dev='hd'/><br>  </os><br>  <features><br>    <acpi/><br>    <apic/><br>    <pae/><br>    <hyperv><br>      <relaxed state='on'/><br>      <vapic state='on'/><br>      <spinlocks state='on' retries='8191'/><br>    </hyperv><br>    <kvm><br>      <hidden state='on'/><br>    </kvm><br>  </features><br>  <cpu mode='host-passthrough'/><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-system-x86_64</emulator><br>    <disk type='file' device='disk'><br>      <driver name='qemu' type='qcow2'/><br>      <source file='/home/virtualguests/windows10/windows10-c-nas.qcow2'/><br>      <target dev='sda' bus='sata'/><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='/storage/windows10-d.qcow2'/><br>      <target dev='sdb' bus='sata'/><br>      <address type='drive' controller='0' bus='0' target='0' unit='1'/><br>    </disk><br>    <controller type='usb' index='0' model='ich9-ehci1'><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' 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='0x1d' 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='0x1d' 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='0x1d' function='0x2'/><br>    </controller><br>    <controller type='sata' index='0'><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/><br>    </controller><br>    <controller type='pci' index='0' model='pcie-root'/><br>    <controller type='pci' index='1' model='dmi-to-pci-bridge'><br>      <model name='i82801b11-bridge'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/><br>    </controller><br>    <controller type='pci' index='2' model='pci-bridge'><br>      <model name='pci-bridge'/><br>      <target chassisNr='2'/><br>      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/><br>    </controller><br>    <controller type='pci' index='3' model='pcie-root-port'><br>      <model name='ioh3420'/><br>      <target chassis='3' port='0x40'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/><br>    </controller><br>    <controller type='virtio-serial' index='0'><br>      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/><br>    </controller><br>    <serial type='pty'><br>      <target port='0'/><br>    </serial><br>    <console type='pty'><br>      <target type='serial' port='0'/><br>    </console><br>    <input type='tablet' bus='usb'><br>      <address type='usb' bus='0' port='1'/><br>    </input><br>    <input type='mouse' bus='ps2'/><br>    <input type='keyboard' bus='ps2'/><br>    <interface type='bridge'><br>      <mac address='52:54:00:12:34:76'/><br>      <source bridge='br0'/><br>      <target dev='tap8'/><br>      <model type='virtio'/><br>      <alias name='virtio'/><br>      <rom bar='off'/><br>    </interface><br>   <hostdev mode='subsystem' type='usb' managed='no'><br>      <source><br>        <vendor id='0x046d'/><br>        <product id='0xc52e'/><br>      </source><br>    </hostdev><br>   <hostdev mode='subsystem' type='usb' managed='no'><br>      <source><br>        <vendor id='0x04d8'/><br>        <product id='0x00df'/><br>      </source><br>    </hostdev><br>    <hostdev mode='subsystem' type='usb' managed='no'><br>      <source><br>        <vendor id='0x28de'/><br>        <product id='0x1142'/><br>      </source><br>    </hostdev><br>    <hostdev mode='subsystem' type='usb' managed='no'><br>      <source><br>        <vendor id='0x0a12'/><br>        <product id='0x0001'/><br>      </source><br>    </hostdev><br>    <hostdev mode='subsystem' type='usb' managed='no'><br>      <source><br>        <vendor id='0x0fcf'/><br>        <product id='0x1009'/><br>      </source><br>    </hostdev><br>    <hostdev mode='subsystem' type='usb' managed='no'><br>      <source><br>        <vendor id='0x1b1c'/><br>        <product id='0x1c0b'/><br>      </source><br>    </hostdev><br>    <sound model='ich6'><br>      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/><br>    </sound><br>    <hostdev mode='subsystem' type='pci' managed='yes'><br>      <source><br>        <address domain='0x0000' bus='0x09' slot='0x00' function='0x0'/><br>      </source><br>      <rom bar='on' file='/home/virtualguests/windows10/r9290.rom'/><br>      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0' multifunction='on'/><br>    </hostdev><br>    <hostdev mode='subsystem' type='pci' managed='yes'><br>      <source><br>        <address domain='0x0000' bus='0x09' slot='0x00' function='0x1'/><br>      </source><br>      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x1'/><br>    </hostdev><br>    <memballoon model='virtio'><br>      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/><br>    </memballoon><br>  </devices><br></domain><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 30, 2017 at 6:04 AM, Graham Neville <span dir="ltr"><<a href="mailto:grahamneville@gmail.com" target="_blank">grahamneville@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>I am using a ROM file which I dumped myself using GPU-Z, this was the only was I could get a display as well. With Q35 I do see TianoCore and then the Windows10 logo but the guest crashes straight after that. I may have to try and do a fresh install with Q35 to see if I can get further. Thanks for the XML, I'll try again tonight and report back.<div><div class="h5"><br><div class="gmail_extra"><br><div class="gmail_quote">On 29 Mar 2017 11:33 p.m., "Steven Walter" <<a href="mailto:stevenrwalter@gmail.com" target="_blank">stevenrwalter@gmail.com</a>> wrote:<br type="attribution"><blockquote class="m_-1210400379959136517quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I didn't have good luck with Windows on BIOS or with Windows on i440.<br>
I pretty much had to use Q35 + OVMF.  You said you had trouble getting<br>
Windows to boot with Q35 + OVMF, did you at least get the TianoCore<br>
logo to come up on your screen?  If not you may need to dump and<br>
specify the ROM file for your video card.  For me OVMF would hang<br>
unless I did this.  Note that I'm using Q35 + OVMF, Opteron_G3 as CPU,<br>
specifying a ROM for the GPU, and running kvm_amd.avic=1.<br>
<br>
Here is my full guest XML file:<br>
<br>
<domain type='kvm'><br>
  <name>WindowsTest</name><br>
  <uuid>d45c3b5f-be8a-41e8-a22c-<wbr>02e91c4c6245</uuid><br>
  <memory unit='KiB'>8388608</memory><br>
  <currentMemory unit='KiB'>8388608</currentMem<wbr>ory><br>
  <vcpu placement='static'>8</vcpu><br>
  <os><br>
    <type arch='x86_64' machine='pc-q35-2.6'>hvm</type<wbr>><br>
    <loader readonly='yes' type='pflash'>/usr/share/OVMF/<wbr>OVMF_CODE.fd</loader><br>
    <nvram>/var/lib/libvirt/qemu/n<wbr>vram/WindowsTest_VARS.fd</nvra<wbr>m><br>
<div class="m_-1210400379959136517quoted-text">    <boot dev='hd'/><br>
  </os><br>
  <features><br>
    <acpi/><br>
    <apic/><br>
</div><div class="m_-1210400379959136517quoted-text">    <hyperv><br>
      <relaxed state='on'/><br>
      <vapic state='on'/><br>
      <spinlocks state='on' retries='8191'/><br>
    </hyperv><br>
</div>  </features><br>
  <cpu mode='host-passthrough'/><br>
<div class="m_-1210400379959136517quoted-text">  <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_power<wbr>off><br>
  <on_reboot>restart</on_reboot><br>
</div>  <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/kvm-spice</<wbr>emulator><br>
<div class="m_-1210400379959136517quoted-text">    <disk type='file' device='disk'><br>
      <driver name='qemu' type='qcow2'/><br>
</div>      <source file='/var/lib/libvirt/images/<wbr>WindowsTest.qcow2'/><br>
      <target dev='sda' bus='sata'/><br>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/><br>
    </disk><br>
<div class="m_-1210400379959136517quoted-text">    <disk type='file' device='cdrom'><br>
      <driver name='qemu' type='raw'/><br>
</div>      <source file='/home/srwalter/Win10_160<wbr>7_English_x64.iso'/><br>
      <target dev='sdb' bus='sata'/><br>
      <readonly/><br>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/><br>
    </disk><br>
    <controller type='usb' index='0' model='ich9-ehci1'><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d'<br>
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='0x1d'<br>
<div class="m_-1210400379959136517quoted-text">function='0x0' multifunction='on'/><br>
</div>    </controller><br>
    <controller type='usb' index='0' model='ich9-uhci2'><br>
      <master startport='2'/><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d'<br>
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='0x1d'<br>
function='0x2'/><br>
    </controller><br>
    <controller type='sata' index='0'><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f'<br>
function='0x2'/><br>
    </controller><br>
    <controller type='pci' index='0' model='pcie-root'/><br>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'><br>
      <model name='i82801b11-bridge'/><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e'<br>
function='0x0'/><br>
    </controller><br>
    <controller type='pci' index='2' model='pci-bridge'><br>
      <model name='pci-bridge'/><br>
      <target chassisNr='2'/><br>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00'<br>
function='0x0'/><br>
    </controller><br>
    <controller type='pci' index='3' model='pcie-root-port'><br>
      <model name='ioh3420'/><br>
      <target chassis='3' port='0x40'/><br>
<div class="m_-1210400379959136517quoted-text">      <address type='pci' domain='0x0000' bus='0x00' slot='0x08'<br>
</div>function='0x0'/><br>
    </controller><br>
    <controller type='virtio-serial' index='0'><br>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03'<br>
function='0x0'/><br>
    </controller><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>
      <address type='usb' bus='0' port='1'/><br>
    </input><br>
<div class="m_-1210400379959136517quoted-text">    <input type='mouse' bus='ps2'/><br>
    <input type='keyboard' bus='ps2'/><br>
</div>    <graphics type='spice' autoport='yes'><br>
      <listen type='address'/><br>
    </graphics><br>
    <sound model='ich6'><br>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02'<br>
function='0x0'/><br>
    </sound><br>
    <video><br>
      <model type='cirrus' vram='16384' heads='1' primary='yes'/><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01'<br>
function='0x0'/><br>
    </video><br>
<div class="m_-1210400379959136517quoted-text">    <hostdev mode='subsystem' type='pci' managed='yes'><br>
      <source><br>
</div>        <address domain='0x0000' bus='0x23' slot='0x00' function='0x0'/><br>
      </source><br>
      <rom bar='on' file='/usr/share/OVMF/Ellesmer<wbr>e.rom'/><br>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00'<br>
<div class="m_-1210400379959136517quoted-text">function='0x0' multifunction='on'/><br>
    </hostdev><br>
    <hostdev mode='subsystem' type='pci' managed='yes'><br>
      <source><br>
</div>        <address domain='0x0000' bus='0x23' slot='0x00' function='0x1'/><br>
      </source><br>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00'<br>
function='0x1'/><br>
    </hostdev><br>
    <redirdev bus='usb' type='spicevmc'><br>
      <address type='usb' bus='0' port='2'/><br>
    </redirdev><br>
    <redirdev bus='usb' type='spicevmc'><br>
      <address type='usb' bus='0' port='3'/><br>
    </redirdev><br>
    <memballoon model='virtio'><br>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04'<br>
function='0x0'/><br>
    </memballoon><br>
  </devices><br>
</domain><br>
<div class="m_-1210400379959136517elided-text"><br>
On Wed, Mar 29, 2017 at 5:44 PM, Graham Neville <<a href="mailto:grahamneville@gmail.com" target="_blank">grahamneville@gmail.com</a>> wrote:<br>
> Thanks for the link. I've tried a number of things but still no further down<br>
> the line.<br>
><br>
> I've tried the following one-by-one<br>
><br>
> kvm_amd.avic=1<br>
> Properly isolated CPUs on host so they are exclusive to guest - isolcpus=0-7<br>
> Changed CPU host-passthrough to Opteron_G5 instead<br>
> Changed CPU to althon<br>
> Changed CPU to qemu64<br>
> kvm-amd.npt=0<br>
> iommu=pt<br>
> Disabled SMT in BIOS<br>
><br>
> In using Arch Linux with Kernel 4.10.1.<br>
><br>
> uname -a<br>
> Linux amdr7 4.10.5-1-ARCH #1 SMP PREEMPT Wed Mar 22 14:42:03 CET 2017 x86_64<br>
> GNU/Linux<br>
><br>
> This is my kernel command line now:<br>
><br>
> BOOT_IMAGE=/vmlinuz-linux root=UUID=bf69add2-e36f-453a-b<wbr>92e-a4343ca20d26 rw<br>
> quiet amd_iommu=on vfio-pci.ids=1002:67b1,1002:aa<wbr>c8 video=efifb:off<br>
> amdgpu.msi=0 kvm_amd.avic=1 isolcpus=0-7 kvm-amd.npt=0 iommu=pt<br>
><br>
> This is my full libvirt XML file for the VM:<br>
><br>
><br>
> <domain type='kvm'><br>
>   <name>windows10</name><br>
>   <uuid>7b222825-fc7d-4a66-<wbr>a72c-5876063752d5</uuid><br>
>   <memory unit='KiB'>8291456</memory><br>
>   <currentMemory unit='KiB'>8291456</currentMem<wbr>ory><br>
>   <vcpu placement='static'>4</vcpu><br>
>   <cputune><br>
>     <vcpupin vcpu='0' cpuset='0'/><br>
>     <vcpupin vcpu='1' cpuset='1'/><br>
>     <vcpupin vcpu='2' cpuset='2'/><br>
>     <vcpupin vcpu='3' cpuset='3'/><br>
>   </cputune><br>
>   <os><br>
>     <type arch='x86_64' machine='pc-i440fx-2.1'>hvm</t<wbr>ype><br>
>     <loader type='pflash'<br>
> readonly='yes'>/home/virtualgu<wbr>ests/windows10/OVMF_CODE.fd</<wbr>loader><br>
>     <nvram>/home/virtualguests/wi<wbr>ndows10/OVMF_VARS.fd</nvram><br>
>     <boot dev='hd'/><br>
>   </os><br>
>  <features><br>
>     <acpi/><br>
>     <apic/><br>
>     <pae/><br>
>     <hyperv><br>
>       <relaxed state='on'/><br>
>       <vapic state='on'/><br>
>       <spinlocks state='on' retries='8191'/><br>
>     </hyperv><br>
>     <kvm><br>
>       <hidden state='on'/><br>
>     </kvm><br>
>   </features><br>
>   <cpus><br>
>     <arch name='x86'><br>
>       <model name='kvm64'><br>
>         <feature name='apic'/><br>
>         <feature name='clflush'/><br>
>         <feature name='cmov'/><br>
>         <feature name='cx16'/><br>
>         <feature name='cx8'/><br>
>         <feature name='de'/><br>
>         <feature name='fpu'/><br>
>         <feature name='fxsr'/><br>
>         <feature name='lm'/><br>
>         <feature name='mca'/><br>
>         <feature name='mce'/><br>
>         <feature name='mmx'/><br>
>         <feature name='msr'/><br>
>         <feature name='mtrr'/><br>
>         <feature name='nx'/><br>
>         <feature name='pae'/><br>
>         <feature name='pat'/><br>
>         <feature name='pge'/><br>
>         <feature name='pni'/><br>
>         <feature name='pse'/><br>
>         <feature name='pse36'/><br>
>         <feature name='sep'/><br>
>         <feature name='sse'/><br>
>         <feature name='sse2'/><br>
>         <feature name='syscall'/><br>
>         <feature name='tsc'/><br>
>       </model><br>
>     </arch><br>
>   </cpus><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_powe<wbr>roff><br>
>   <on_reboot>restart</on_<wbr>reboot><br>
>   <on_crash>destroy</on_crash><br>
>   <devices><br>
>     <emulator>/usr/bin/qemu-syste<wbr>m-x86_64</emulator><br>
>     <disk type='file' device='disk'><br>
>       <driver name='qemu' type='qcow2' /><br>
>       <source file='/home/virtualguests/wind<wbr>ows10/windows10-c-nas.qcow2'/><br>
>       <target dev='vdb' bus='virtio'/><br>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x07'<br>
> function='0x0'/><br>
>     </disk><br>
>     <disk type='file' device='cdrom'><br>
>       <driver name='qemu' type='raw'/><br>
>       <source<br>
> file='/home/virtualguests/wind<wbr>ows10/Win10_1607_EnglishIntern<wbr>ational_x64.iso'/><br>
>       <target dev='hdc' bus='ide'/><br>
>       <readonly/><br>
>       <address type='drive' controller='0' bus='1' unit='0'/><br>
>     </disk><br>
>     <disk type='file' device='disk'><br>
>       <driver name='qemu' type='qcow2' cache='none'/><br>
>       <source file='/storage/windows10-d.qco<wbr>w2'/><br>
>       <target dev='vdc' bus='virtio'/><br>
>     </disk><br>
>     <controller type='pci' index='0' model='pci-root' /><br>
>     <interface type='bridge'><br>
>       <mac address='52:54:00:12:34:76'/><br>
>       <source bridge='br0'/><br>
>       <target dev='tap8'/><br>
>       <model type='virtio'/><br>
>       <alias name='virtio'/><br>
>       <rom bar='off'/><br>
>     </interface><br>
>     <input type='mouse' bus='ps2'/><br>
>     <input type='keyboard' bus='ps2'/><br>
>     <hostdev mode='subsystem' type='usb' managed='no'><br>
>       <source><br>
>         <vendor id='0x046d'/><br>
>         <product id='0xc52e'/><br>
>       </source><br>
>     </hostdev><br>
>     <hostdev mode='subsystem' type='usb' managed='no'><br>
>       <source><br>
>         <vendor id='0x28de'/><br>
>         <product id='0x1142'/><br>
>       </source><br>
>     </hostdev><br>
>     <hostdev mode='subsystem' type='usb' managed='no'><br>
>       <source><br>
>         <vendor id='0x0a12'/><br>
>         <product id='0x0001'/><br>
>       </source><br>
>     </hostdev><br>
>     <hostdev mode='subsystem' type='usb' managed='no'><br>
>       <source><br>
>         <vendor id='0x0fcf'/><br>
>         <product id='0x1009'/><br>
>       </source><br>
>     </hostdev><br>
>     <hostdev mode='subsystem' type='usb' managed='no'><br>
>       <source><br>
>         <vendor id='0x1b1c'/><br>
>         <product id='0x1c0b'/><br>
>       </source><br>
>     </hostdev><br>
>     <hostdev mode='subsystem' type='usb' managed='no'><br>
>       <source><br>
>         <vendor id='0x05e3'/><br>
>         <product id='0x0608'/><br>
>         <address bus='1' device='5'/><br>
>       </source><br>
>     </hostdev><br>
>     <hostdev mode='subsystem' type='pci' managed='yes'><br>
>       <source><br>
>         <address domain='0x0000' bus='0x09' slot='0x00' function='0x0' /><br>
>       </source><br>
>       <rom bar='on' file='/home/virtualguests/wind<wbr>ows10/r9290.rom'/><br>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x08'<br>
> function='0x0' multifunction='on'/><br>
>     </hostdev><br>
>     <hostdev mode='subsystem' type='pci' managed='yes'><br>
>       <source><br>
>         <address domain='0x0000' bus='0x09' slot='0x00' function='0x1'/><br>
>       </source><br>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x09'<br>
> function='0x0'/><br>
>     </hostdev><br>
>    <memballoon model='none'/><br>
>   </devices><br>
> </domain><br>
><br>
><br>
><br>
> When I have host-passthrough, Opteron_G5, althon or qemu64 CPUs configured I<br>
> see a lot of these stack traces just appearing frequently and not just when<br>
> the guest crashes, I see nothing when the guest crashes<br>
><br>
> [ 2848.156709] ------------[ cut here ]------------<br>
> [ 2848.156719] WARNING: CPU: 0 PID: 1445 at arch/x86/kvm/svm.c:1484<br>
> avic_vcpu_load+0x15a/0x180 [kvm_amd]<br>
> [ 2848.156720] Modules linked in: vhost_net vhost macvtap macvlan tun nfsv3<br>
> rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache hid_logitech_hidpp<br>
> usb_serial_simple cdc_acm usbserial hid_logitech_dj cfg80211 bridge stp llc<br>
> amdgpu sd_mod edac_mce_amd radeon edac_core kvm_amd kvm crct10dif_pclmul<br>
> crc32_pclmul crc32c_intel ghash_clmulni_intel pcbc ppdev ttm<br>
> snd_hda_codec_realtek snd_hda_codec_generic drm_kms_helper aesni_intel drm<br>
> btusb snd_hda_intel nls_iso8859_1 aes_x86_64 btrtl crypto_simd nls_cp437<br>
> btbcm glue_helper syscopyarea btintel sysfillrect snd_hda_codec vfat r8169<br>
> joydev sysimgblt fat fb_sys_fops i2c_algo_bit bluetooth cryptd evdev<br>
> mousedev uas mii input_leds snd_hda_core rfkill pcspkr led_class snd_hwdep<br>
> mac_hid snd_pcm snd_timer ccp sp5100_tco snd i2c_piix4 soundcore rng_core<br>
> shpchp wmi parport_pc<br>
> [ 2848.156772]  parport fjes 8250_dw i2c_designware_platform tpm_infineon<br>
> i2c_designware_core button acpi_cpufreq tpm_tis tpm_tis_core tpm nfsd<br>
> auth_rpcgss oid_registry nfs_acl lockd grace sch_fq_codel sunrpc ip_tables<br>
> x_tables ext4 crc16 jbd2 fscrypto mbcache usb_storage hid_generic usbhid hid<br>
> ahci libahci xhci_pci libata xhci_hcd usbcore scsi_mod nvme usb_common<br>
> nvme_core serio vfio_pci irqbypass vfio_virqfd vfio_iommu_type1 vfio<br>
> [ 2848.156798] CPU: 0 PID: 1445 Comm: CPU 0/KVM Tainted: G        W<br>
> 4.10.5-1-ARCH #1<br>
> [ 2848.156798] Hardware name: Gigabyte Technology Co., Ltd. Default<br>
> string/AB350M-Gaming 3-CF, BIOS F2 02/20/2017<br>
> [ 2848.156799] Call Trace:<br>
> [ 2848.156807]  dump_stack+0x63/0x83<br>
> [ 2848.156812]  __warn+0xcb/0xf0<br>
> [ 2848.156816]  warn_slowpath_null+0x1d/0x20<br>
> [ 2848.156819]  avic_vcpu_load+0x15a/0x180 [kvm_amd]<br>
> [ 2848.156822]  svm_vcpu_unblocking+0x18/0x20 [kvm_amd]<br>
> [ 2848.156834]  kvm_vcpu_block+0xd3/0x330 [kvm]<br>
> [ 2848.156844]  ? kvm_get_rflags+0x1a/0x30 [kvm]<br>
> [ 2848.156856]  kvm_arch_vcpu_ioctl_run+0x4ea/<wbr>0x1680 [kvm]<br>
> [ 2848.156859]  ? _copy_to_user+0x54/0x60<br>
> [ 2848.156867]  kvm_vcpu_ioctl+0x339/0x630 [kvm]<br>
> [ 2848.156872]  do_vfs_ioctl+0xa3/0x5f0<br>
> [ 2848.156876]  ? __fget+0x77/0xb0<br>
> [ 2848.156880]  SyS_ioctl+0x79/0x90<br>
> [ 2848.156883]  entry_SYSCALL_64_fastpath+0x1a<wbr>/0xa9<br>
> [ 2848.156885] RIP: 0033:0x7f9980dbd0d7<br>
> [ 2848.156886] RSP: 002b:00007f9972efb8e8 EFLAGS: 00000246 ORIG_RAX:<br>
> 0000000000000010<br>
> [ 2848.156887] RAX: ffffffffffffffda RBX: 00007f9987e0d001 RCX:<br>
> 00007f9980dbd0d7<br>
> [ 2848.156888] RDX: 0000000000000000 RSI: 000000000000ae80 RDI:<br>
> 0000000000000013<br>
> [ 2848.156888] RBP: 0000000000000001 R08: 000055c65eff4830 R09:<br>
> 00000000000000ff<br>
> [ 2848.156889] R10: 0000000000000001 R11: 0000000000000246 R12:<br>
> 0000000000000001<br>
> [ 2848.156889] R13: 00007f9987e0c000 R14: 0000000000000000 R15:<br>
> 00007f99745a5980<br>
> [ 2848.156905] ---[ end trace e49522bc58864bce ]---<br>
><br>
> I still haven't tried SeaBIOS yet, I'm still running 'pc-i440fx-2.1' with<br>
> OVMF, not Q35. I couldn't get Windows to boot with Q35.<br>
><br>
> I also noticed something really odd in the fact that after the guest crashes<br>
> I see random pictures on the TV, which I assume are coming from Arch - I see<br>
> things like a woman at a football stadium and waterfalls - I'm not sure if<br>
> this would be expected if the card is assigned to vfio-pci?<br>
><br>
> @Steven Walter, can you paste a full copy of your libvirt XML file please?<br>
><br>
> Just for completeness here are my IOMMU groups:<br>
><br>
> [gneville@amdr7 ~]$ lspci -nn<br>
> 00:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1450]<br>
> 00:00.2 IOMMU [0806]: Advanced Micro Devices, Inc. [AMD] Device [1022:1451]<br>
> 00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1452]<br>
> 00:01.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1453]<br>
> 00:01.3 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1453]<br>
> 00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1452]<br>
> 00:03.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1452]<br>
> 00:03.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1453]<br>
> 00:04.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1452]<br>
> 00:07.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1452]<br>
> 00:07.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1454]<br>
> 00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1452]<br>
> 00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1454]<br>
> 00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus<br>
> Controller [1022:790b] (rev 59)<br>
> 00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge<br>
> [1022:790e] (rev 51)<br>
> 00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1460]<br>
> 00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1461]<br>
> 00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1462]<br>
> 00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1463]<br>
> 00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1464]<br>
> 00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1465]<br>
> 00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1466]<br>
> 00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1467]<br>
> 01:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd<br>
> Device [144d:a804]<br>
> 03:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:43bb] (rev 02)<br>
> 03:00.1 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:43b7] (rev 02)<br>
> 03:00.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:43b2] (rev 02)<br>
> 04:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:43b4] (rev 02)<br>
> 04:01.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:43b4] (rev 02)<br>
> 04:04.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:43b4] (rev 02)<br>
> 05:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd.<br>
> RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev<br>
> 0c)<br>
> 07:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd<br>
> Device [144d:a804]<br>
> 09:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc.<br>
> [AMD/ATI] Hawaii PRO [Radeon R9 290/390] [1002:67b1]<br>
> 09:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii<br>
> HDMI Audio [Radeon R9 290/290X / 390/390X] [1002:aac8]<br>
> 11:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc.<br>
> [AMD] Device [1022:145a]<br>
> 11:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD]<br>
> Device [1022:1456]<br>
> 11:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:145c]<br>
> 12:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc.<br>
> [AMD] Device [1022:1455]<br>
> 12:00.2 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA<br>
> Controller [AHCI mode] [1022:7901] (rev 51)<br>
> 12:00.3 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Device<br>
> [1022:1457]<br>
> [gneville@amdr7 ~]$<br>
><br>
> virsh nodedev-dumpxml pci_0000_09_00_0<br>
> <device><br>
>   <name>pci_0000_09_00_0</name><br>
>   <path>/sys/devices/pci0000:<wbr>00/0000:00:03.1/0000:09:00.0</<wbr>path><br>
>   <parent>pci_0000_00_03_1</par<wbr>ent><br>
>   <driver><br>
>     <name>vfio-pci</name><br>
>   </driver><br>
>   <capability type='pci'><br>
>     <domain>0</domain><br>
>     <bus>9</bus><br>
>     <slot>0</slot><br>
>     <function>0</function><br>
>     <product id='0x67b1'>Hawaii PRO [Radeon R9 290/390]</product><br>
>     <vendor id='0x1002'>Advanced Micro Devices, Inc. [AMD/ATI]</vendor><br>
>     <iommuGroup number='2'><br>
>       <address domain='0x0000' bus='0x00' slot='0x03' function='0x0'/><br>
>       <address domain='0x0000' bus='0x09' slot='0x00' function='0x1'/><br>
>       <address domain='0x0000' bus='0x00' slot='0x03' function='0x1'/><br>
>       <address domain='0x0000' bus='0x09' slot='0x00' function='0x0'/><br>
>     </iommuGroup><br>
>   </capability><br>
> </device><br>
><br>
> find /sys/kernel/iommu_groups/ -type l<br>
> /sys/kernel/iommu_groups/7/dev<wbr>ices/0000:00:18.6<br>
> /sys/kernel/iommu_groups/7/dev<wbr>ices/0000:00:18.4<br>
> /sys/kernel/iommu_groups/7/dev<wbr>ices/0000:00:18.2<br>
> /sys/kernel/iommu_groups/7/dev<wbr>ices/0000:00:18.0<br>
> /sys/kernel/iommu_groups/7/dev<wbr>ices/0000:00:18.7<br>
> /sys/kernel/iommu_groups/7/dev<wbr>ices/0000:00:18.5<br>
> /sys/kernel/iommu_groups/7/dev<wbr>ices/0000:00:18.3<br>
> /sys/kernel/iommu_groups/7/dev<wbr>ices/0000:00:18.1<br>
> /sys/kernel/iommu_groups/5/dev<wbr>ices/0000:12:00.2<br>
> /sys/kernel/iommu_groups/5/dev<wbr>ices/0000:00:08.1<br>
> /sys/kernel/iommu_groups/5/dev<wbr>ices/0000:12:00.0<br>
> /sys/kernel/iommu_groups/5/dev<wbr>ices/0000:12:00.3<br>
> /sys/kernel/iommu_groups/5/dev<wbr>ices/0000:00:08.0<br>
> /sys/kernel/iommu_groups/3/dev<wbr>ices/0000:00:04.0<br>
> /sys/kernel/iommu_groups/1/dev<wbr>ices/0000:00:02.0<br>
> /sys/kernel/iommu_groups/6/dev<wbr>ices/0000:00:14.0<br>
> /sys/kernel/iommu_groups/6/dev<wbr>ices/0000:00:14.3<br>
> /sys/kernel/iommu_groups/4/dev<wbr>ices/0000:11:00.2<br>
> /sys/kernel/iommu_groups/4/dev<wbr>ices/0000:11:00.0<br>
> /sys/kernel/iommu_groups/4/dev<wbr>ices/0000:00:07.1<br>
> /sys/kernel/iommu_groups/4/dev<wbr>ices/0000:11:00.3<br>
> /sys/kernel/iommu_groups/4/dev<wbr>ices/0000:00:07.0<br>
> /sys/kernel/iommu_groups/2/dev<wbr>ices/0000:00:03.0<br>
> /sys/kernel/iommu_groups/2/dev<wbr>ices/0000:09:00.1<br>
> /sys/kernel/iommu_groups/2/dev<wbr>ices/0000:00:03.1<br>
> /sys/kernel/iommu_groups/2/dev<wbr>ices/0000:09:00.0<br>
> /sys/kernel/iommu_groups/0/dev<wbr>ices/0000:07:00.0<br>
> /sys/kernel/iommu_groups/0/dev<wbr>ices/0000:03:00.1<br>
> /sys/kernel/iommu_groups/0/dev<wbr>ices/0000:00:01.3<br>
> /sys/kernel/iommu_groups/0/dev<wbr>ices/0000:04:01.0<br>
> /sys/kernel/iommu_groups/0/dev<wbr>ices/0000:00:01.1<br>
> /sys/kernel/iommu_groups/0/dev<wbr>ices/0000:04:04.0<br>
> /sys/kernel/iommu_groups/0/dev<wbr>ices/0000:05:00.0<br>
> /sys/kernel/iommu_groups/0/dev<wbr>ices/0000:04:00.0<br>
> /sys/kernel/iommu_groups/0/dev<wbr>ices/0000:03:00.2<br>
> /sys/kernel/iommu_groups/0/dev<wbr>ices/0000:03:00.0<br>
> /sys/kernel/iommu_groups/0/dev<wbr>ices/0000:00:01.0<br>
> /sys/kernel/iommu_groups/0/dev<wbr>ices/0000:01:00.0<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> On Wed, Mar 29, 2017 at 12:24 PM, Steven Walter <<a href="mailto:stevenrwalter@gmail.com" target="_blank">stevenrwalter@gmail.com</a>><br>
> wrote:<br>
>><br>
>> I  got a similar (though multi-GPU) setup working, which I wrote up<br>
>> here:<br>
>> <a href="https://www.reddit.com/r/VFIO/comments/616xih/gpu_passthrough_with_msi_b350_tomahawk/" target="_blank" rel="noreferrer">https://www.reddit.com/r/VFIO/<wbr>comments/616xih/gpu_passthroug<wbr>h_with_msi_b350_tomahawk/</a><br>
>><br>
>> One thing that may help you is to enable AVIC (kvm_amd.avic=1).  What<br>
>> I saw without AVIC was that things would work briefly (only a few<br>
>> seconds for me) before interrupts would stop getting delivered.<br>
>> Sounds like things are working better for you without AVIC than they<br>
>> did for me, but perhaps the extra improvement in IRQ latency would fix<br>
>> the hangs you get during intensive graphics operations.<br>
>><br>
>><br>
>> On Tue, Mar 28, 2017 at 6:02 PM, Graham Neville <<a href="mailto:grahamneville@gmail.com" target="_blank">grahamneville@gmail.com</a>><br>
>> wrote:<br>
>> > I've managed to get pci-e passthough working on a gigabyte gaming 3 matx<br>
>> > MB<br>
>> > and Ryzen 1700, no ACS patch, using only 1 GPU - AMD r9 290. However I'm<br>
>> > facing a problem with the whole KVM setup and not sure what it's related<br>
>> > to.<br>
>> > For the Windows10 guest with the GPU passed through it crashes (guest<br>
>> > only,<br>
>> > host is fine) whenever I try anything graphics intensive, for example<br>
>> > running Witcher3. Normal desktop is fine.<br>
>> > Also my Linux guests are acting odd when I try to SSH to them, I notice<br>
>> > that<br>
>> > the SSH terminals just stop working randomly. And then there's the issue<br>
>> > with very slow network throughout to both VMs. I have no idea what's<br>
>> > going<br>
>> > on. It used to work fine with my Intel setup. There's no logs in dmesg<br>
>> > to<br>
>> > show a problem either.<br>
>> ><br>
>> > I'm going to try Seabios instead of OVMF to see if I can stop the<br>
>> > crashing.<br>
>> ><br>
>> > Any one having similar issues or anyone can advise?<br>
>> ><br>
>> ><br>
>> > ______________________________<wbr>_________________<br>
>> > vfio-users mailing list<br>
>> > <a href="mailto:vfio-users@redhat.com" target="_blank">vfio-users@redhat.com</a><br>
>> > <a href="https://www.redhat.com/mailman/listinfo/vfio-users" target="_blank" rel="noreferrer">https://www.redhat.com/mailman<wbr>/listinfo/vfio-users</a><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> -Steven Walter <<a href="mailto:stevenrwalter@gmail.com" target="_blank">stevenrwalter@gmail.com</a>><br>
><br>
><br>
<br>
<br>
<br>
</div><font color="#888888">--<br>
-Steven Walter <<a href="mailto:stevenrwalter@gmail.com" target="_blank">stevenrwalter@gmail.com</a>><br>
</font></blockquote></div><br></div></div></div></div></div>
</blockquote></div><br></div></blockquote>
<div class="plaintext"><blockquote>
</blockquote><p dir="auto">_______________________________________________<br>
vfio-users mailing list<br>
vfio-users@redhat.com<br>
<a href="https://www.redhat.com/mailman/listinfo/vfio-users">https://www.redhat.com/mailman/listinfo/vfio-users</a></p>
</blockquote></div>

</body>
</html>