<div dir="ltr">I can confirm that it works with no issues with UEFI. I recently replaced R9 270 by RX 480 and it even worked with not issues after I forgot to update/remove the old ROM file for R9. Here is my command line. It uses a few variables for multiple GPU but you should get the base picture. I have both Windows 7 and WIndows 10 VMs and all of them work fine.<br><div><br></div><div>qemu-system-x86_64 -enable-kvm -cpu host -m $memoryarg -smp sockets=1,cores=$corearg,threads=2 \</div><div>-serial none \</div><div>-ctrl-grab -no-quit \</div><div>-parallel none \</div><div>$soundarg \</div><div>-name passthrough-$1 \</div><div>-rtc base=localtime \</div><div>-drive if=pflash,format=raw,readonly,file=$folder/OVMF_CODE-pure-efi.fd \</div><div>-drive if=pflash,format=raw,file=$folder/OVMF_VARS-pure-efi.fd \</div><div>-netdev bridge,id=hn0 -device e1000,netdev=hn0,id=nic1,mac=$macaddr \</div><div>-drive file=$folder/W7_UEFI.qcow2,id=d0,if=none -device ide-hd,drive=d0,serial=$hddserial \</div><div>-device vfio-pci,host=$vgapci \</div><div>-device vfio-pci,host=$audiopci </div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 22, 2017 at 8:22 AM, Quentin Deldycke <span dir="ltr"><<a href="mailto:quentindeldycke@gmail.com" target="_blank">quentindeldycke@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="ltr">Hi,<div><br></div><div>Ovmf makes the process more easy. I don't remember exactly why, but before i was using a AMD HD 5870. Using old style bioses as it was not uefi. When i switched to the r9 290, i had to switch to uefi so ovmf.</div><div><br></div><div>I experienced issues with the integrated sound card of my r9 (was all time default on windows...). I have the sound device linked to vfio-pci but never pass it to the virtual machine, you can possibly try like this also.</div><div><br></div><div>For a more easy process i never disable the intergrated intel gpu of my cpu. It used plain old vga for bios post and cie.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="m_-7536577740978068757gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">--<div>Deldycke Quentin<br></div><div><div><br></div></div></div></div></div><div><div class="h5">
<br><div class="gmail_quote">On 22 August 2017 at 16:57, Jiri Novak <span dir="ltr"><<a href="mailto:jiri.novak@ghorland.net" target="_blank">jiri.novak@ghorland.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div class="m_-7536577740978068757m_5792246376525477513moz-cite-prefix">Hi,<br>
      <br>
      yes, not using OVMF, maybe that will fix it, not sure, I can try.<br>
      I don't have any R9 card, I actually did have one before, but now
      I have R7 240 and RX 480 at hand. R9 did work fine before, like
      the R7 does.<br>
      I pass in two (three) devices, one is the card (plus the
      integrated soundcard, you can't pass it without, right? it's the
      same iommu group always) and a USB controller to be able to
      connect kb+mouse.<br>
      for the RX, the romfile has no effect obviously, though for the R7
      it won't start without it (R9 didn't care either).<br>
      no isolation so far, just taskset so it won't roam across numa
      nodes. might add later.<br>
      <br>
      my boot card is nvidia, so I have radeon and amdgpu blacklisted.
      also tried disabling "boot option rom" on the pcie ports so bios
      of the host doesn't try to initialize them. doesn't have effect,
      except that if it is allowed and the order of the cards is that
      amd is sooner, boot display will go to it. if disabled, it will go
      to the nvidia (I keep that one enabled at all cases, if I disable
      all, I'm doomed - bios reset needeed :))<br>
      <br>
      I think my only chance now is ovmf, I have no other idea.<br>
      <br>
      lspci for reference:<br>
      <br>
      00:00.0 Host bridge: Intel Corporation Xeon E5/Core i7 DMI2 (rev
      07)<br>
      00:01.0 PCI bridge: Intel Corporation Xeon E5/Core i7 IIO PCI
      Express Root Port 1a (rev 07)<br>
      00:02.0 PCI bridge: Intel Corporation Xeon E5/Core i7 IIO PCI
      Express Root Port 2a (rev 07)<br>
      00:03.0 PCI bridge: Intel Corporation Xeon E5/Core i7 IIO PCI
      Express Root Port 3a in PCI Express Mode (rev 07)<br>
      00:04.0 System peripheral: Intel Corporation Xeon E5/Core i7 DMA
      Channel 0 (rev 07)<br>
      00:04.1 System peripheral: Intel Corporation Xeon E5/Core i7 DMA
      Channel 1 (rev 07)<br>
      00:04.2 System peripheral: Intel Corporation Xeon E5/Core i7 DMA
      Channel 2 (rev 07)<br>
      00:04.3 System peripheral: Intel Corporation Xeon E5/Core i7 DMA
      Channel 3 (rev 07)<br>
      00:04.4 System peripheral: Intel Corporation Xeon E5/Core i7 DMA
      Channel 4 (rev 07)<br>
      00:04.5 System peripheral: Intel Corporation Xeon E5/Core i7 DMA
      Channel 5 (rev 07)<br>
      00:04.6 System peripheral: Intel Corporation Xeon E5/Core i7 DMA
      Channel 6 (rev 07)<br>
      00:04.7 System peripheral: Intel Corporation Xeon E5/Core i7 DMA
      Channel 7 (rev 07)<br>
      00:05.0 System peripheral: Intel Corporation Xeon E5/Core i7
      Address Map, VTd_Misc, System Management (rev 07)<br>
      00:05.2 System peripheral: Intel Corporation Xeon E5/Core i7
      Control Status and Global Errors (rev 07)<br>
      00:05.4 PIC: Intel Corporation Xeon E5/Core i7 I/O APIC (rev 07)<br>
      00:11.0 PCI bridge: Intel Corporation C600/X79 series chipset PCI
      Express Virtual Root Port (rev 06)<br>
      00:16.0 Communication controller: Intel Corporation C600/X79
      series chipset MEI Controller #1 (rev 05)<br>
      00:16.1 Communication controller: Intel Corporation C600/X79
      series chipset MEI Controller #2 (rev 05)<br>
      00:1a.0 USB controller: Intel Corporation C600/X79 series chipset
      USB2 Enhanced Host Controller #2 (rev 06)<br>
      00:1b.0 Audio device: Intel Corporation C600/X79 series chipset
      High Definition Audio Controller (rev 06)<br>
      00:1c.0 PCI bridge: Intel Corporation C600/X79 series chipset PCI
      Express Root Port 1 (rev b6)<br>
      00:1c.5 PCI bridge: Intel Corporation C600/X79 series chipset PCI
      Express Root Port 6 (rev b6)<br>
      00:1c.6 PCI bridge: Intel Corporation C600/X79 series chipset PCI
      Express Root Port 7 (rev b6)<br>
      00:1d.0 USB controller: Intel Corporation C600/X79 series chipset
      USB2 Enhanced Host Controller #1 (rev 06)<br>
      00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a6)<br>
      00:1f.0 ISA bridge: Intel Corporation C600/X79 series chipset LPC
      Controller (rev 06)<br>
      00:1f.2 SATA controller: Intel Corporation C600/X79 series chipset
      6-Port SATA AHCI Controller (rev 06)<br>
      00:1f.3 SMBus: Intel Corporation C600/X79 series chipset SMBus
      Host Controller (rev 06)<br>
      00:1f.6 Signal processing controller: Intel Corporation C600/X79
      series chipset Thermal Management Controller (rev 06)<br>
      01:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic
      SAS2308 PCI-Express Fusion-MPT SAS-2 (rev 05)<br>
      02:00.0 VGA compatible controller: Advanced Micro Devices, Inc.
      [AMD/ATI] Ellesmere [Radeon RX 470/480] (rev c7)<br>
      02:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI]
      Device aaf0<br>
      03:00.0 VGA compatible controller: Advanced Micro Devices, Inc.
      [AMD/ATI] Oland [Radeon HD 8570 / R7 240/340 OEM]<br>
      03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape
      Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]<br>
      04:00.0 Serial Attached SCSI controller: Intel Corporation C602
      chipset 4-Port SATA Storage Control Unit (rev 06)<br>
      05:00.0 Ethernet controller: Intel Corporation I350 Gigabit
      Network Connection (rev 01)<br>
      05:00.1 Ethernet controller: Intel Corporation I350 Gigabit
      Network Connection (rev 01)<br>
      07:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host
      Controller (rev 04)<br>
      08:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host
      Controller (rev 04)<br>
      09:02.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22A
      IEEE-1394a-2000 Controller (PHY/Link) [iOHCI-Lynx]<br>
      7f:08.0 System peripheral: Intel Corporation Xeon E5/Core i7 QPI
      Link 0 (rev 07)<br>
      7f:08.3 System peripheral: Intel Corporation Xeon E5/Core i7 QPI
      Link Reut 0 (rev 07)<br>
      7f:08.4 System peripheral: Intel Corporation Xeon E5/Core i7 QPI
      Link Reut 0 (rev 07)<br>
      7f:09.0 System peripheral: Intel Corporation Xeon E5/Core i7 QPI
      Link 1 (rev 07)<br>
      7f:09.3 System peripheral: Intel Corporation Xeon E5/Core i7 QPI
      Link Reut 1 (rev 07)<br>
      7f:09.4 System peripheral: Intel Corporation Xeon E5/Core i7 QPI
      Link Reut 1 (rev 07)<br>
      7f:0a.0 System peripheral: Intel Corporation Xeon E5/Core i7 Power
      Control Unit 0 (rev 07)<br>
      7f:0a.1 System peripheral: Intel Corporation Xeon E5/Core i7 Power
      Control Unit 1 (rev 07)<br>
      7f:0a.2 System peripheral: Intel Corporation Xeon E5/Core i7 Power
      Control Unit 2 (rev 07)<br>
      7f:0a.3 System peripheral: Intel Corporation Xeon E5/Core i7 Power
      Control Unit 3 (rev 07)<br>
      7f:0b.0 System peripheral: Intel Corporation Xeon E5/Core i7
      Interrupt Control Registers (rev 07)<br>
      7f:0b.3 System peripheral: Intel Corporation Xeon E5/Core i7
      Semaphore and Scratchpad Configuration Registers (rev 07)<br>
      7f:0c.0 System peripheral: Intel Corporation Xeon E5/Core i7
      Unicast Register 0 (rev 07)<br>
      7f:0c.1 System peripheral: Intel Corporation Xeon E5/Core i7
      Unicast Register 0 (rev 07)<br>
      7f:0c.2 System peripheral: Intel Corporation Xeon E5/Core i7
      Unicast Register 0 (rev 07)<br>
      7f:0c.3 System peripheral: Intel Corporation Xeon E5/Core i7
      Unicast Register 0 (rev 07)<br>
      7f:0c.6 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller System Address Decoder 0 (rev 07)<br>
      7f:0c.7 System peripheral: Intel Corporation Xeon E5/Core i7
      System Address Decoder (rev 07)<br>
      7f:0d.0 System peripheral: Intel Corporation Xeon E5/Core i7
      Unicast Register 0 (rev 07)<br>
      7f:0d.1 System peripheral: Intel Corporation Xeon E5/Core i7
      Unicast Register 0 (rev 07)<br>
      7f:0d.2 System peripheral: Intel Corporation Xeon E5/Core i7
      Unicast Register 0 (rev 07)<br>
      7f:0d.3 System peripheral: Intel Corporation Xeon E5/Core i7
      Unicast Register 0 (rev 07)<br>
      7f:0d.6 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller System Address Decoder 1 (rev 07)<br>
      7f:0e.0 System peripheral: Intel Corporation Xeon E5/Core i7
      Processor Home Agent (rev 07)<br>
      7f:0e.1 Performance counters: Intel Corporation Xeon E5/Core i7
      Processor Home Agent Performance Monitoring (rev 07)<br>
      7f:0f.0 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Registers (rev 07)<br>
      7f:0f.1 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller RAS Registers (rev 07)<br>
      7f:0f.2 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Target Address Decoder 0 (rev 07)<br>
      7f:0f.3 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Target Address Decoder 1 (rev 07)<br>
      7f:0f.4 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Target Address Decoder 2 (rev 07)<br>
      7f:0f.5 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Target Address Decoder 3 (rev 07)<br>
      7f:0f.6 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Target Address Decoder 4 (rev 07)<br>
      7f:10.0 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Channel 0-3 Thermal Control 0 (rev
      07)<br>
      7f:10.1 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Channel 0-3 Thermal Control 1 (rev
      07)<br>
      7f:10.2 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller ERROR Registers 0 (rev 07)<br>
      7f:10.3 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller ERROR Registers 1 (rev 07)<br>
      7f:10.4 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Channel 0-3 Thermal Control 2 (rev
      07)<br>
      7f:10.5 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Channel 0-3 Thermal Control 3 (rev
      07)<br>
      7f:10.6 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller ERROR Registers 2 (rev 07)<br>
      7f:10.7 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller ERROR Registers 3 (rev 07)<br>
      7f:11.0 System peripheral: Intel Corporation Xeon E5/Core i7 DDRIO
      (rev 07)<br>
      7f:13.0 System peripheral: Intel Corporation Xeon E5/Core i7
      R2PCIe (rev 07)<br>
      7f:13.1 Performance counters: Intel Corporation Xeon E5/Core i7
      Ring to PCI Express Performance Monitor (rev 07)<br>
      7f:13.4 Performance counters: Intel Corporation Xeon E5/Core i7
      QuickPath Interconnect Agent Ring Registers (rev 07)<br>
      7f:13.5 Performance counters: Intel Corporation Xeon E5/Core i7
      Ring to QuickPath Interconnect Link 0 Performance Monitor (rev 07)<br>
      7f:13.6 System peripheral: Intel Corporation Xeon E5/Core i7 Ring
      to QuickPath Interconnect Link 1 Performance Monitor (rev 07)<br>
      80:01.0 PCI bridge: Intel Corporation Xeon E5/Core i7 IIO PCI
      Express Root Port 1a (rev 07)<br>
      80:02.0 PCI bridge: Intel Corporation Xeon E5/Core i7 IIO PCI
      Express Root Port 2a (rev 07)<br>
      80:03.0 PCI bridge: Intel Corporation Xeon E5/Core i7 IIO PCI
      Express Root Port 3a in PCI Express Mode (rev 07)<br>
      80:03.2 PCI bridge: Intel Corporation Xeon E5/Core i7 IIO PCI
      Express Root Port 3c (rev 07)<br>
      80:04.0 System peripheral: Intel Corporation Xeon E5/Core i7 DMA
      Channel 0 (rev 07)<br>
      80:04.1 System peripheral: Intel Corporation Xeon E5/Core i7 DMA
      Channel 1 (rev 07)<br>
      80:04.2 System peripheral: Intel Corporation Xeon E5/Core i7 DMA
      Channel 2 (rev 07)<br>
      80:04.3 System peripheral: Intel Corporation Xeon E5/Core i7 DMA
      Channel 3 (rev 07)<br>
      80:04.4 System peripheral: Intel Corporation Xeon E5/Core i7 DMA
      Channel 4 (rev 07)<br>
      80:04.5 System peripheral: Intel Corporation Xeon E5/Core i7 DMA
      Channel 5 (rev 07)<br>
      80:04.6 System peripheral: Intel Corporation Xeon E5/Core i7 DMA
      Channel 6 (rev 07)<br>
      80:04.7 System peripheral: Intel Corporation Xeon E5/Core i7 DMA
      Channel 7 (rev 07)<br>
      80:05.0 System peripheral: Intel Corporation Xeon E5/Core i7
      Address Map, VTd_Misc, System Management (rev 07)<br>
      80:05.2 System peripheral: Intel Corporation Xeon E5/Core i7
      Control Status and Global Errors (rev 07)<br>
      80:05.4 PIC: Intel Corporation Xeon E5/Core i7 I/O APIC (rev 07)<br>
      82:00.0 VGA compatible controller: NVIDIA Corporation G98 [Quadro
      NVS 295] (rev a1)<br>
      ff:08.0 System peripheral: Intel Corporation Xeon E5/Core i7 QPI
      Link 0 (rev 07)<br>
      ff:08.3 System peripheral: Intel Corporation Xeon E5/Core i7 QPI
      Link Reut 0 (rev 07)<br>
      ff:08.4 System peripheral: Intel Corporation Xeon E5/Core i7 QPI
      Link Reut 0 (rev 07)<br>
      ff:09.0 System peripheral: Intel Corporation Xeon E5/Core i7 QPI
      Link 1 (rev 07)<br>
      ff:09.3 System peripheral: Intel Corporation Xeon E5/Core i7 QPI
      Link Reut 1 (rev 07)<br>
      ff:09.4 System peripheral: Intel Corporation Xeon E5/Core i7 QPI
      Link Reut 1 (rev 07)<br>
      ff:0a.0 System peripheral: Intel Corporation Xeon E5/Core i7 Power
      Control Unit 0 (rev 07)<br>
      ff:0a.1 System peripheral: Intel Corporation Xeon E5/Core i7 Power
      Control Unit 1 (rev 07)<br>
      ff:0a.2 System peripheral: Intel Corporation Xeon E5/Core i7 Power
      Control Unit 2 (rev 07)<br>
      ff:0a.3 System peripheral: Intel Corporation Xeon E5/Core i7 Power
      Control Unit 3 (rev 07)<br>
      ff:0b.0 System peripheral: Intel Corporation Xeon E5/Core i7
      Interrupt Control Registers (rev 07)<br>
      ff:0b.3 System peripheral: Intel Corporation Xeon E5/Core i7
      Semaphore and Scratchpad Configuration Registers (rev 07)<br>
      ff:0c.0 System peripheral: Intel Corporation Xeon E5/Core i7
      Unicast Register 0 (rev 07)<br>
      ff:0c.1 System peripheral: Intel Corporation Xeon E5/Core i7
      Unicast Register 0 (rev 07)<br>
      ff:0c.2 System peripheral: Intel Corporation Xeon E5/Core i7
      Unicast Register 0 (rev 07)<br>
      ff:0c.3 System peripheral: Intel Corporation Xeon E5/Core i7
      Unicast Register 0 (rev 07)<br>
      ff:0c.6 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller System Address Decoder 0 (rev 07)<br>
      ff:0c.7 System peripheral: Intel Corporation Xeon E5/Core i7
      System Address Decoder (rev 07)<br>
      ff:0d.0 System peripheral: Intel Corporation Xeon E5/Core i7
      Unicast Register 0 (rev 07)<br>
      ff:0d.1 System peripheral: Intel Corporation Xeon E5/Core i7
      Unicast Register 0 (rev 07)<br>
      ff:0d.2 System peripheral: Intel Corporation Xeon E5/Core i7
      Unicast Register 0 (rev 07)<br>
      ff:0d.3 System peripheral: Intel Corporation Xeon E5/Core i7
      Unicast Register 0 (rev 07)<br>
      ff:0d.6 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller System Address Decoder 1 (rev 07)<br>
      ff:0e.0 System peripheral: Intel Corporation Xeon E5/Core i7
      Processor Home Agent (rev 07)<br>
      ff:0e.1 Performance counters: Intel Corporation Xeon E5/Core i7
      Processor Home Agent Performance Monitoring (rev 07)<br>
      ff:0f.0 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Registers (rev 07)<br>
      ff:0f.1 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller RAS Registers (rev 07)<br>
      ff:0f.2 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Target Address Decoder 0 (rev 07)<br>
      ff:0f.3 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Target Address Decoder 1 (rev 07)<br>
      ff:0f.4 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Target Address Decoder 2 (rev 07)<br>
      ff:0f.5 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Target Address Decoder 3 (rev 07)<br>
      ff:0f.6 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Target Address Decoder 4 (rev 07)<br>
      ff:10.0 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Channel 0-3 Thermal Control 0 (rev
      07)<br>
      ff:10.1 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Channel 0-3 Thermal Control 1 (rev
      07)<br>
      ff:10.2 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller ERROR Registers 0 (rev 07)<br>
      ff:10.3 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller ERROR Registers 1 (rev 07)<br>
      ff:10.4 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Channel 0-3 Thermal Control 2 (rev
      07)<br>
      ff:10.5 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller Channel 0-3 Thermal Control 3 (rev
      07)<br>
      ff:10.6 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller ERROR Registers 2 (rev 07)<br>
      ff:10.7 System peripheral: Intel Corporation Xeon E5/Core i7
      Integrated Memory Controller ERROR Registers 3 (rev 07)<br>
      ff:11.0 System peripheral: Intel Corporation Xeon E5/Core i7 DDRIO
      (rev 07)<br>
      ff:13.0 System peripheral: Intel Corporation Xeon E5/Core i7
      R2PCIe (rev 07)<br>
      ff:13.1 Performance counters: Intel Corporation Xeon E5/Core i7
      Ring to PCI Express Performance Monitor (rev 07)<br>
      ff:13.4 Performance counters: Intel Corporation Xeon E5/Core i7
      QuickPath Interconnect Agent Ring Registers (rev 07)<br>
      ff:13.5 Performance counters: Intel Corporation Xeon E5/Core i7
      Ring to QuickPath Interconnect Link 0 Performance Monitor (rev 07)<br>
      ff:13.6 System peripheral: Intel Corporation Xeon E5/Core i7 Ring
      to QuickPath Interconnect Link 1 Performance Monitor (rev 07)<br>
      <br>
      <br>
      Quentin Deldycke wrote:<br>
    </div><div><div class="m_-7536577740978068757h5">
    <blockquote type="cite">
      <div dir="ltr">If you want, here is a working i440fx libvirt xml
        file using r9 290
        <div><br>
        </div>
        <div>I would say much thing about your command line:</div>
        <div>
          <ul>
            <li>You are not using OVMF. For modern cards, i think it is
              much more suitable.</li>
            <li>Is your R9 your boot card? If it is the case, it is
              'initailized' by linux a way or another. This is not good
              :/</li>
            <li>I would delete ALL unneeded devices like your second
              passed through device, second drive, sound card... To
              target only your problematic device</li>
            <li>Why providing the rom file of the card? Are you trying
              to make it pass for another one? (like providing a r9 290x
              rom for a r9 290?)</li>
            <li>Do you use isolcpu? Or any kind of cpu pinning?</li>
          </ul>
          <div><br>
          </div>
        </div>
        <div>Actually libvirt is quite easy to configure and provide
          much more interesting features like cpu pinning...</div>
      </div>
      <div class="gmail_extra"><br clear="all">
        <div>
          <div class="m_-7536577740978068757m_5792246376525477513gmail_signature" data-smartmail="gmail_signature">
            <div dir="ltr">--
              <div>Deldycke Quentin<br>
              </div>
              <div>
                <div><br>
                </div>
              </div>
            </div>
          </div>
        </div>
        <br>
        <div class="gmail_quote">On 22 August 2017 at 16:12, Jiri Novak
          <span dir="ltr"><<a href="mailto:jiri.novak@ghorland.net" target="_blank">jiri.novak@ghorland.net</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF">
              <div class="m_-7536577740978068757m_5792246376525477513m_-5929279670192329629moz-cite-prefix">Hi,<br>
                <br>
                not sure in this case, with other GPU, R7 240 it works
                fine, there's nothing else on the same iommu group than
                the gpu and it's soundcard.<br>
                When I started teting out things like this some time ago
                libvirt didn't allow to set up all the things that were
                needes for vga passthrough, so I've just trashed and
                stayed like that :) Might retry now on debian 9, if it
                supports what I need or not.<br>
                Anyway, with libvirt it's usually more difficult to fix
                the wrong commandline so I'm trying to find out what is
                actually wrong to be able to fix it, not to hope libvirt
                will work out of the box and if not, I'm doomed :)<br>
                <br>
                Gh.<br>
                <br>
                Quentin Deldycke wrote:<br>
              </div>
              <div>
                <div class="m_-7536577740978068757m_5792246376525477513h5">
                  <blockquote type="cite">
                    <div dir="ltr">Hello,
                      <div><br>
                      </div>
                      <div>I think that first, you should use libvirt.</div>
                      <div>I believe that most bugs are from a badly
                        made qemu command line, bad isolations or stull
                        like this.</div>
                      <div><br>
                      </div>
                      <div>Libvirt => less pain, more working vms!</div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                    </div>
                    <div class="gmail_extra"><br clear="all">
                      <div>
                        <div class="m_-7536577740978068757m_5792246376525477513m_-5929279670192329629gmail_signature" data-smartmail="gmail_signature">
                          <div dir="ltr">--
                            <div>Deldycke Quentin<br>
                            </div>
                            <div>
                              <div><br>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <br>
                      <div class="gmail_quote">On 22 August 2017 at
                        13:16, Jiri Novak <span dir="ltr"><<a href="mailto:jiri.novak@ghorland.net" target="_blank">jiri.novak@ghorland.net</a>></span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
                          <br>
                          I've got back again to  testing the RX 480
                          setup with tips I got<br>
                          previously (like using i440fx instead of q35)
                          and got a bit further, now<br>
                          I can run it at least in 2D mode (if I use
                          driver from windows update)<br>
                          on windows 10 rev 1703.<br>
                          <br>
                          If I install full driver from AMD website, the
                          host hangs during install<br>
                          and after that, it runs about 2-3minutes after
                          boot until it hangs.<br>
                          With driver from windows update, it hangs when
                          I run any game.<br>
                          <br>
                          Any ideas what to try next, how to find out
                          what's wrong?<br>
                          <br>
                          Qemu commandline:<br>
                          <br>
                          LC_ALL=C<br>
                          PATH=/usr/local/sbin:/usr/loca<wbr>l/bin:/usr/sbin:/usr/bin:/sbin<wbr>:/bin<br>
                          QEMU_AUDIO_DRV=pa /usr/bin/taskset -c
                          4-7,20-23<br>
                          /usr/bin/qemu-system-x86_64 \<br>
                              -name 12-wingame \<br>
                              -machine pc-i440fx-2.8,accel=kvm,usb=of<wbr>f
                          \<br>
                              -cpu host \<br>
                              -object<br>
                          memory-backend-file,id=mem0,si<wbr>ze=16G,mem-path=/dev/hugepages<wbr>1g,share=off
                          \<br>
                              -numa node,nodeid=0,memdev=mem0 \<br>
                              -m 16G \<br>
                              -realtime mlock=off \<br>
                              -smp sockets=1,cores=4,threads=2 \<br>
                              -uuid 4baaaaaa-aaf5-aaaaaa-919d-aaaa<wbr>aaacaaaa
                          \<br>
                              -nographic -no-user-config -nodefaults
                          -no-hpet \<br>
                              -rtc base=localtime,driftfix=slew \<br>
                              -global kvm-pit.lost_tick_policy=disca<wbr>rd
                          \<br>
                              -boot d \<br>
                              -drive<br>
                          file=/dev/Z-ssd/qemu/12-wingam<wbr>e,if=none,id=drive-virtio-disk<wbr>0,format=raw,cache=none,aio=na<wbr>tive<br>
                          \<br>
                              -drive<br>
                          file=/dev/Z-ssd/data/games-bli<wbr>zzard,if=none,id=drive-virtio-<wbr>disk1,format=raw,cache=none,ai<wbr>o=native<br>
                          \<br>
                              -device virtio-scsi-pci,bus=pci.0,addr<wbr>=0x5
                          \<br>
                              -device scsi-hd,drive=drive-virtio-dis<wbr>k0
                          \<br>
                              -device scsi-hd,drive=drive-virtio-dis<wbr>k1
                          \<br>
                              -netdev tap,id=netdev0,ifname=V0300t12<wbr>,script=no,downscript=no
                          \<br>
                              -device<br>
                          virtio-net-pci,netdev=netdev0,<wbr>id=net0,mac=42:42:42:00:00:0c,<wbr>bus=pci.0,addr=0x6<br>
                          \<br>
                              -device<br>
                          vfio-pci,host=02:00.0,id=hostd<wbr>ev6,bus=pci.0,multifunction=on<wbr>,addr=0x3,x-vga=on,romfile=/ro<wbr>ot/roms/Sapphire.RX480.4096.16<wbr>1002.rom<br>
                          \<br>
                              -device vfio-pci,host=02:00.1,id=hostd<wbr>ev7,bus=pci.0,addr=0x3.0x1
                          \<br>
                              -device vfio-pci,host=07:00.0,id=hostd<wbr>ev2,bus=pci.0,addr=0x4
                          \<br>
                              -vga none \<br>
                              -soundhw hda \<br>
                              -device virtio-rng-pci \<br>
                              -chardev stdio,id=seabios \<br>
                              -device isa-debugcon,iobase=0x402,char<wbr>dev=seabios
                          \<br>
                              -msg timestamp=on \<br>
                              >>/var/log/kvm/12-wingame.stdo<wbr>ut
                          2>>/var/log/kvm/12-wingame.std<wbr>err
                          &<br>
                          <br>
                          Usually I don't manage to get any error,
                          though once the host managed to<br>
                          spit out this to console (when it crashed
                          after 2 minutes with amd driver)<br>
                          <br>
                          INFO: rcu_sched detected stalls on CPUs/tasks:<br>
                          [ 1558.573332]     2-...: (0 ticks this GP)
                          idle=a16/0/0<br>
                          softirq=17601/17601 fqs=1<br>
                          [ 1558.573400]     17-...: (1 GPs behind)
                          idle=9c8/0/0<br>
                          softirq=13311/13311 fqs=1<br>
                          [ 1558.573452]     20-...: (24 GPs behind)
                          idle=be0/0/0<br>
                          softirq=30971/30972 fqs=1<br>
                          [ 1558.573505]     21-...: (4 GPs behind)
                          idle=4a0/0/0<br>
                          softirq=26182/26183 fqs=1<br>
                          [ 1558.573557]     23-...: (0 ticks this GP)
                          idle=b45/140000000000000/0<br>
                          softirq=30549/30549 fqs=1<br>
                          [ 1558.573615]     (detected by 14, t=5252
                          jiffies, g=47014, c=47013,<br>
                          q=40045)<br>
                          [ 1558.573670] Task dump for CPU 2:<br>
                          [ 1558.573672] swapper/2       R  running
                          task        0     0      1<br>
                          0x00200008<br>
                          [ 1558.573680]  0000000000000083
                          640fb4432252d28b 0000016601c54f00<br>
                          0000000000000002<br>
                          [ 1558.573685]  ffffffffb78b2320
                          0000000000000004 ffffffffb7205d60<br>
                          ffffffffb78b2320<br>
                          [ 1558.573689]  ffffc24a4028a0d0
                          ffffffffb78b2518 0000000000000005<br>
                          ffffffffb70cbb2a<br>
                          [ 1558.573693] Call Trace:<br>
                          [ 1558.573705]  [<ffffffffb7205d60>] ?
                          intel_idle+0x100/0x110<br>
                          [ 1558.573712]  [<ffffffffb70cbb2a>] ?
                          cpuidle_enter_state+0xea/0x2b0<br>
                          [ 1558.573717]  [<ffffffffb6cb9504>] ?
                          cpu_startup_entry+0x154/0x240<br>
                          [ 1558.573721]  [<ffffffffb6c4805d>] ?
                          start_secondary+0x14d/0x190<br>
                          [ 1558.573724] Task dump for CPU 17:<br>
                          [ 1558.573726] swapper/17      R  running
                          task        0     0      1<br>
                          0x00200008<br>
                          [ 1558.573729]  0000000000000083
                          fc4308ad94b8ed74 0000016749d5af00<br>
                          0000000000000011<br>
                          [ 1558.573734]  ffffffffb78b2320
                          0000000000000004 ffffffffb7205d60<br>
                          ffffffffb78b2320<br>
                          [ 1558.573737]  ffffc24a4044a0d0
                          ffffffffb78b2518 0000000000000005<br>
                          ffffffffb70cbb2a<br>
                          [ 1558.573741] Call Trace:<br>
                          [ 1558.573746]  [<ffffffffb7205d60>] ?
                          intel_idle+0x100/0x110<br>
                          [ 1558.573750]  [<ffffffffb70cbb2a>] ?
                          cpuidle_enter_state+0xea/0x2b0<br>
                          [ 1558.573753]  [<ffffffffb6cb9504>] ?
                          cpu_startup_entry+0x154/0x240<br>
                          [ 1558.573756]  [<ffffffffb6c4805d>] ?
                          start_secondary+0x14d/0x190<br>
                          [ 1558.573758] Task dump for CPU 20:<br>
                          [ 1558.573759] swapper/20      R  running
                          task        0     0      1<br>
                          0x00200008<br>
                          [ 1558.573763]  0000000000000083
                          39fde3c30b22afa7 0000016b9477af00<br>
                          0000000000000014<br>
                          [ 1558.573767]  ffffffffb78b2320
                          0000000000000004 ffffffffb7205d60<br>
                          ffffffffb78b2320<br>
                          [ 1558.573771]  ffffc24a4050a0d0
                          ffffffffb78b2518 0000000000000005<br>
                          ffffffffb70cbb2a<br>
                          [ 1558.573774] Call Trace:<br>
                          [ 1558.573778]  [<ffffffffb7205d60>] ?
                          intel_idle+0x100/0x110<br>
                          [ 1558.573782]  [<ffffffffb70cbb2a>] ?
                          cpuidle_enter_state+0xea/0x2b0<br>
                          [ 1558.573785]  [<ffffffffb6cb9504>] ?
                          cpu_startup_entry+0x154/0x240<br>
                          [ 1558.573788]  [<ffffffffb6c4805d>] ?
                          start_secondary+0x14d/0x190<br>
                          [ 1558.573790] Task dump for CPU 21:<br>
                          [ 1558.573792] swapper/21      R  running
                          task        0     0      1<br>
                          0x00200008<br>
                          [ 1558.573795]  0000000000000083
                          6b8f35123dc25bdb 0000016b9477af00<br>
                          0000000000000015<br>
                          [ 1558.573799]  ffffffffb78b2320
                          0000000000000004 ffffffffb7205d60<br>
                          ffffffffb78b2320<br>
                          [ 1558.573803]  ffffc24a4054a0d0
                          ffffffffb78b2518 0000000000000005<br>
                          ffffffffb70cbb2a<br>
                          [ 1558.573806] Call Trace:<br>
                          [ 1558.573810]  [<ffffffffb7205d60>] ?
                          intel_idle+0x100/0x110<br>
                          [ 1558.573814]  [<ffffffffb70cbb2a>] ?
                          cpuidle_enter_state+0xea/0x2b0<br>
                          [ 1558.573817]  [<ffffffffb6cb9504>] ?
                          cpu_startup_entry+0x154/0x240<br>
                          [ 1558.573820]  [<ffffffffb6c4805d>] ?
                          start_secondary+0x14d/0x190<br>
                          [ 1558.573822] Task dump for CPU 23:<br>
                          [ 1558.573824] qemu-system-x86 R  running
                          task        0 18608      1<br>
                          0x00000800<br>
                          [ 1558.573827]  0000000000000000
                          ffffffffc1551560 0000000000000000<br>
                          0000000000000000<br>
                          [ 1558.573831]  ffff9404e1c00040
                          ffffffffc153d9a7 0000000000000000<br>
                          ffff9404e1c02760<br>
                          [ 1558.573835]  ffffffffc1519882
                          0000000000000000 ffff9404e1c02760<br>
                          0000000000000004<br>
                          [ 1558.573839] Call Trace:<br>
                          [ 1558.573882]  [<ffffffffc153d9a7>] ?
                          x86_emulate_insn+0x257/0xcf0 [kvm]<br>
                          [ 1558.573909]  [<ffffffffc1519882>] ?<br>
                          emulator_pio_in_emulated+0x102<wbr>/0x190
                          [kvm]<br>
                          [ 1558.573937]  [<ffffffffc1539d31>] ?
                          writeback+0x61/0x210 [kvm]<br>
                          [ 1558.573962]  [<ffffffffc1535e1d>] ?
                          writeback_registers+0x4d/0x60 [kvm]<br>
                          [ 1558.573972]  [<ffffffffc09dc21f>] ?
                          atomic_switch_perf_msrs+0x6f/0<wbr>xa0<br>
                          [kvm_intel]<br>
                          [ 1558.574011]  [<ffffffffc15252e3>] ?<br>
                          kvm_arch_vcpu_ioctl_run+0x6b3/<wbr>0x1600
                          [kvm]<br>
                          [ 1558.574035]  [<ffffffffc151f2fb>] ?
                          kvm_arch_vcpu_load+0x5b/0x270 [kvm]<br>
                          [ 1558.574039]  [<ffffffffb6c30765>] ?
                          __kernel_fpu_end+0x35/0x100<br>
                          [ 1558.574059]  [<ffffffffc150b4b5>] ?
                          kvm_vcpu_ioctl+0x315/0x5d0 [kvm]<br>
                          [ 1558.574063]  [<ffffffffb6ca1800>] ?
                          wake_up_q+0x70/0x70<br>
                          [ 1558.574066]  [<ffffffffb6cb8799>] ?
                          __wake_up_common+0x49/0x80<br>
                          [ 1558.574069]  [<ffffffffb6e1603f>] ?
                          do_vfs_ioctl+0x9f/0x600<br>
                          [ 1558.574092]  [<ffffffffc151b898>] ?
                          kvm_on_user_return+0x68/0xa0 [kvm]<br>
                          [ 1558.574094]  [<ffffffffb6e16614>] ?
                          SyS_ioctl+0x74/0x80<br>
                          [ 1558.574111]  [<ffffffffb720627b>] ?
                          system_call_fast_compare_end+0<wbr>xc/0x9b<br>
                          [ 1558.574116] rcu_sched kthread starved for
                          5248 jiffies! g47014 c47013<br>
                          f0x2 RCU_GP_WAIT_FQS(3) ->state=0x100<br>
                          [ 1558.574186] rcu_sched       W    0     8   
                            2 0x00000000<br>
                          [ 1558.574189]  ffff9414d1facc00
                          0000000000000000 ffff9404f8c3e080<br>
                          ffff9404ffad8240<br>
                          [ 1558.574193]  ffff9404f8c6f0c0
                          ffffa25a400b7db0 ffffffffb72015d3<br>
                          ffffa25a400b7de0<br>
                          [ 1558.574197]  000000010004b899
                          ffff9404ffad8240 0000000000000003<br>
                          ffff9404f8c3e080<br>
                          [ 1558.574201] Call Trace:<br>
                          [ 1558.574205]  [<ffffffffb72015d3>] ?
                          __schedule+0x233/0x6d0<br>
                          [ 1558.574208]  [<ffffffffb7201aa2>] ?
                          schedule+0x32/0x80<br>
                          [ 1558.574211]  [<ffffffffb7204dae>] ?
                          schedule_timeout+0x17e/0x310<br>
                          [ 1558.574217]  [<ffffffffb6ce3e50>] ?
                          del_timer_sync+0x50/0x50<br>
                          [ 1558.574220]  [<ffffffffb6cdd605>] ?
                          rcu_gp_kthread+0x505/0x850<br>
                          [ 1558.574223]  [<ffffffffb6cb8799>] ?
                          __wake_up_common+0x49/0x80<br>
                          [ 1558.574226]  [<ffffffffb6cdd100>] ?
                          rcu_note_context_switch+0xe0/0<wbr>xe0<br>
                          [ 1558.574230]  [<ffffffffb6c965d7>] ?
                          kthread+0xd7/0xf0<br>
                          [ 1558.574234]  [<ffffffffb6c96500>] ?
                          kthread_park+0x60/0x60<br>
                          [ 1558.574238]  [<ffffffffb72064f5>] ?
                          ret_from_fork+0x25/0x30<br>
                          <br>
                          Thanks,<br>
                          Gh.<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" rel="noreferrer" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/vfio-users</a><br>
                          <br>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div></div></div>
<br>______________________________<wbr>_________________<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/<wbr>mailman/listinfo/vfio-users</a><br>
<br></blockquote></div><br></div>