Help with 7900XTX passthrough to Windows 11 VM


Javen

Recommended Posts

Hello,

 

I’m facing some issues when passing through my 7900 XTX to windows VM. (Error code 43)

 

My build:

AMD Ryzen R9 7950

Gigabyte B650m elite (with latest 1.0.0.7c bios)

4x32GB RAM

PowerColor hellhound 7900xtx

Nvidia Tesla P40

 

Tried following setting combination(not all combination tested, but most possible ones all tested and no luck. E.g. if some basic configuration doesn’t work, I might enable unsafe interrupts and test again but not regression test all previous combinations):

Bios:

1. Resize bar on or off

2. CSM on or off

 

Unraid:

1. PCIe ACS override set to No or Both

2. VFIO allow unsafe interrupts: No or Yes

3. Append video=efifb:off,vesafb:off for boot entry

4. Switch between UEFI and legacy boot mode

5. VFIO bound GPU and corresponding sound card part

6. Install Radeon reset bug plugin or not

 

VM(I will paste my configuration here): 

1. VM and CPU part:

<memoryBacking>
    <source type='memfd'/>
    <access mode='shared'/>
  </memoryBacking>
  <vcpu placement='static'>16</vcpu>
  <os>
    <type arch='x86_64' machine='pc-q35-7.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi-tpm.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/7cf78376-63b6-b8c6-5499-5421719f1fd7_VARS-pure-efi-tpm.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv mode='custom'>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vpindex state='on'/>
      <synic state='on'/>
      <stimer state='on'/>
      <vendor_id state='on' value='1234567890ab'/>
    </hyperv>
    <kvm>
      <hidden state='on'/>
    </kvm>
  </features>
  <cpu mode='host-passthrough' check='none' migratable='off'>
    <topology sockets='1' dies='1' cores='16' threads='1'/>
    <cache mode='passthrough'/>
    <feature policy='require' name='topoext'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>

2. GPU part:

<hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
      </source>
      <rom file='/mnt/user/isos/vbios/7900xtx.rom'/>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0' multifunction='on'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x03' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x1'/>
    </hostdev>

Couple combinations I tried for VM configuration:

1. With or without vBios. 

2. vBios dump from GPUz(on other bare metal Windows), from Unraid dump vBios script and download from TechPowerup(I use red devil one)

3. Vendor id none or a random one.

4. KVM hidden state on or not specify at all.

 

I tested above combination for about 3 days, followed many guides in other thread, and still no luck. It always report error code 43 in windows device manager. e.g.:

1. A thread talk about 7900xt passthrough

2. Previous AMD 5700xt passthrough

 

Any one can still give me a hint?

 

PS: Not sure if it’s relevant, but in another 7900xt passthrough thread, it’s mentioned to passthrough all 4 devices related to the GPU. However in my case, there is only 2. Let’s say in Unraid System devices section, my GPU is located in 03:00:xx. I can only see a VGA compatible controller and one Audio device in 03:00:xx. I guess is it might related to usbc ports from reference card(which my model doesn’t have).

Link to comment
15 minutes ago, Javen said:

Hello,

 

I’m facing some issues when passing through my 7900 XTX to windows VM. (Error code 43)

 

My build:

AMD Ryzen R9 7950

Gigabyte B650m elite (with latest 1.0.0.7c bios)

4x32GB RAM

PowerColor hellhound 7900xtx

Nvidia Tesla P40

 

Tried following setting combination(not all combination tested, but most possible ones all tested and no luck. E.g. if some basic configuration doesn’t work, I might enable unsafe interrupts and test again but not regression test all previous combinations):

Bios:

1. Resize bar on or off

2. CSM on or off

 

Unraid:

1. PCIe ACS override set to No or Both

2. VFIO allow unsafe interrupts: No or Yes

3. Append video=efifb:off,vesafb:off for boot entry

4. Switch between UEFI and legacy boot mode

5. VFIO bound GPU and corresponding sound card part

6. Install Radeon reset bug plugin or not

 

VM(I will paste my configuration here): 

1. VM and CPU part:

<memoryBacking>
    <source type='memfd'/>
    <access mode='shared'/>
  </memoryBacking>
  <vcpu placement='static'>16</vcpu>
  <os>
    <type arch='x86_64' machine='pc-q35-7.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi-tpm.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/7cf78376-63b6-b8c6-5499-5421719f1fd7_VARS-pure-efi-tpm.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv mode='custom'>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vpindex state='on'/>
      <synic state='on'/>
      <stimer state='on'/>
      <vendor_id state='on' value='1234567890ab'/>
    </hyperv>
    <kvm>
      <hidden state='on'/>
    </kvm>
  </features>
  <cpu mode='host-passthrough' check='none' migratable='off'>
    <topology sockets='1' dies='1' cores='16' threads='1'/>
    <cache mode='passthrough'/>
    <feature policy='require' name='topoext'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>

2. GPU part:

<hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
      </source>
      <rom file='/mnt/user/isos/vbios/7900xtx.rom'/>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0' multifunction='on'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x03' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x1'/>
    </hostdev>

Couple combinations I tried for VM configuration:

1. With or without vBios. 

2. vBios dump from GPUz(on other bare metal Windows), from Unraid dump vBios script and download from TechPowerup(I use red devil one)

3. Vendor id none or a random one.

4. KVM hidden state on or not specify at all.

 

I tested above combination for about 3 days, followed many guides in other thread, and still no luck. It always report error code 43 in windows device manager. e.g.:

1. A thread talk about 7900xt passthrough

2. Previous AMD 5700xt passthrough

 

Any one can still give me a hint?

 

PS: Not sure if it’s relevant, but in another 7900xt passthrough thread, it’s mentioned to passthrough all 4 devices related to the GPU. However in my case, there is only 2. Let’s say in Unraid System devices section, my GPU is located in 03:00:xx. I can only see a VGA compatible controller and one Audio device in 03:00:xx. I guess is it might related to usbc ports from reference card(which my model doesn’t have).

Have you tried without setting multifunction in the XML?

Link to comment
2 hours ago, SimonF said:

Have you tried without setting multifunction in the XML?

Do you mean just leave GPU part as it is in first creation?

 

Will try that. Maybe I tried that before days ago when I just came back from a Windows Server and almost forgot how to passthrough GPU in Unraid.

Link to comment
  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.