Return to Level1Techs.com

How do I get PCIe above 1.1 using virsh edit or otherwise

UPDATE:
Read on these forums that qemu version 4.0 should provide the proper PCIe bus speed on q35 without making additional edits to the XML. As far as I could tell my Linux Mint install being based on Ubuntu was still stuck with a terribly old 2.11 qemu version and even after struggling with building packages from source I eventually just gave up.
I installed Manjaro which thanks to being a rolling release distro has recently updated qemu binaries so I’m now looking at a fresh Win10 VM install that has the correct PCIe bus speed.
If you’re a noob like me, try Manjaro, seems to have less problems with ancient software. My USB DAC also magically just worked unlike on Mint.

Original Post:
In my Win10 VM the passsed through GPU is stuck at 1.1 bus speed and it’s probably the cause for memory clock often dropping to idle speeds even when a demanding game is running in the foreground so the framerate turns into a slideshow of frames.
I read multiple threads on this forum and elsewhere and tried figuring out how to apply the fixes myself but I’m giving up and need some help since I just keep getting errors and no one has posted a fool proof explanation.

The following are all the controller entries in my XML file that can supposedly be edited with virsh edit (VMname) to allow for PCIe 3.0 in the VM.

<controller type='usb' index='0' model='nec-xhci'>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x8'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
    </controller>
    <controller type='pci' index='2' model='dmi-to-pci-bridge'>
      <model name='i82801b11-bridge'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='3' model='pci-bridge'>
      <model name='pci-bridge'/>
      <target chassisNr='3'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </controller>
    <controller type='pci' index='4' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='4' port='0x9'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='pci' index='5' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='5' port='0xa'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='6' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='6' port='0xb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
    </controller>
    <controller type='pci' index='7' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='7' port='0xc'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/>
    </controller>
    <controller type='pci' index='8' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='8' port='0xd'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/>
    </controller>
    <controller type='pci' index='9' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='9' port='0xe'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/>
    </controller>

I assume the next part is the correct bit for the GPU because of the bus being 0x26 and using lspci the passed through GPU and its audio are 26:00.0 and 26:00.1

<hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x26' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x26' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
    </hostdev>

Related to this I would appreciate a short explanation in layman’s terms about chipsets q35 and i440fx for VMs and why one or the other should be used. From what I’ve read and understood from other threads my PCIe bus speed problem might be resolved by itself if I reinstalled the VM on i440fx but I don’t know what else will change.