<div dir="ltr"><div>Hi,</div><div><br></div><div>A quick google found this for code 43 so it might help.</div><div><a href="https://passthroughpo.st/apply-error-43-workaround/">https://passthroughpo.st/apply-error-43-workaround/</a></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 27 Oct 2020 at 11:49, James Courtier-Dutton <<a href="mailto:james.dutton@gmail.com">james.dutton@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>I have a threadripper cpu.</div><div>I had some problems some time ago with passthru of a AMD Vega GPU.</div><div>I was doing a passthru to a Linux VM.</div><div>I don't know if the below fix will help a Nvidia GPU, but thought I would mention it in case.<br></div><div>A change was needed to qemu to get it working.</div><div>With the AMD Vega GPU, the problem was with the PCI window size. 256MB vs 8GB.</div><div>The resize GPU BAR problem appears to be an  AMD Threadripper specific, which is why not many people see the problem.<br></div><div> </div><div>Also, For me ovmf worked and seabios did not, so try both to see which works best.</div><div>I found that a Linux VM gives better error messages, so you can track the problem down better than with Windows.<br></div><div>I have no idea what Error Code 43 is, so this bug fix might not help or apply to you at all. <br></div><div><br></div><div>The change in qemu is in the mainline qemu now, so make sure you try the very latest qemu.</div><div>For more details, search the archives for the subject "Passthru problems with a Vega GPU"</div><div>If you are interested, the patch that fixed the problem for me was:</div><div>diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c<br>
index 8cecb53d5cf6..ac9ef9323ef4 100644<br>
--- a/hw/vfio/pci.c<br>
+++ b/hw/vfio/pci.c<br>
@@ -2118,6 +2118,7 @@ static void vfio_add_ext_cap(VFIOPCIDevice *vdev)<br>
         case 0: /* kernel masked capability */<br>
         case PCI_EXT_CAP_ID_SRIOV: /* Read-only VF BARs confuse OVMF */<br>
         case PCI_EXT_CAP_ID_ARI: /* XXX Needs next function virtualization */<br>
+        case PCI_EXT_CAP_ID_REBAR:<br>
             trace_vfio_add_ext_cap_dropped(vdev-><a href="http://vbasedev.name" rel="noreferrer" target="_blank">vbasedev.name</a>, cap_id, next);<br>
             break;<br>
         default:</div><div><br></div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 26 Oct 2020 at 02:25, Roger Lawhorn <<a href="mailto:rll@twc.com" target="_blank">rll@twc.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">i use seabios.<br>
ovmf gives me troubles.<br>
i use amd threadripper cpu.<br>
<br>
<br>
On 10/25/20 7:32 AM, Ivan Volosyuk wrote:<br>
> Interesting. I never passed the rom option to my 2080 ti and it works<br>
> fine with windows 10. In January 2020 I was using qemu-4.0, since then<br>
> I swapped a few versions of qemu till 5.1 and it works fine without<br>
> the rom option. I use intel CPUs though. I wonder if that's the<br>
> difference.<br>
> I use edk2-ovmf though. I wasn't able to get it to work with seabios.<br>
><br>
> On Sun, Oct 25, 2020 at 8:59 PM Roger Lawhorn <<a href="mailto:rll@twc.com" target="_blank">rll@twc.com</a>> wrote:<br>
>> I tried pushing off my rtx 2080 to windows 10.<br>
>> Kept getting code 43.<br>
>><br>
>> I added hv_time,kvm=off,hv_vendor_id=null  to my -cpu line and it fixed the issue.<br>
>> Just in case someone else has this issue.<br>
>> I also had to download a rom file that matched my video card.<br>
>> QEMU cannot get past the option rom execution without the rom file.<br>
>><br>
>><br>
>> Here is my code:<br>
>><br>
>> qemu4.0-system-x86_64 -machine type=q35,accel=kvm -cpu EPYC,hv_time,kvm=off,hv_vendor_id=null \<br>
>> -chardev stdio,id=seabios -device isa-debugcon,iobase=0x402,chardev=seabios \<br>
>> -smp $1,sockets=1,cores=$1 \<br>
>> -global q35-pcihost.pci-hole64-size=11G \<br>
>> -bios /usr/share/seabios/bios.bin \<br>
>> -m 32G \<br>
>> -vga none \<br>
>> -soundhw hda \<br>
>> -mem-prealloc \<br>
>> -rtc clock=host,base=localtime \<br>
>> -device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \<br>
>> -device vfio-pci,host=0a:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on,romfile=/media/dad/QEMU-SSD/qemu-wd/rtx.rom<br>
>><br>
>><br>
>><br>
>><br>
>> Where I got my rom file:<br>
>> <a href="https://www.techpowerup.com/vgabios/204970/palit-rtx2080ti-11264-180919" rel="noreferrer" target="_blank">https://www.techpowerup.com/vgabios/204970/palit-rtx2080ti-11264-180919</a><br>
>><br>
>><br>
>> _______________________________________________<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/listinfo/vfio-users</a><br>
<br>
_______________________________________________<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/listinfo/vfio-users</a><br>
<br>
</blockquote></div></div>
</blockquote></div>