Hi,

I have a threadripper cpu.
I had some problems some time ago with passthru of a AMD Vega GPU.
I was doing a passthru to a Linux VM.
I don't know if the below fix will help a Nvidia GPU, but thought I would
mention it in case.
A change was needed to qemu to get it working.
With the AMD Vega GPU, the problem was with the PCI window size. 256MB vs
8GB.
The resize GPU BAR problem appears to be an  AMD Threadripper specific,
which is why not many people see the problem.
Also, For me ovmf worked and seabios did not, so try both to see which
works best.
I found that a Linux VM gives better error messages, so you can track the
problem down better than with Windows.
I have no idea what Error Code 43 is, so this bug fix might not help or
apply to you at all.

The change in qemu is in the mainline qemu now, so make sure you try the
very latest qemu.
For more details, search the archives for the subject "Passthru problems
with a Vega GPU"
If you are interested, the patch that fixed the problem for me was:
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 8cecb53d5cf6..ac9ef9323ef4 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -2118,6 +2118,7 @@ static void vfio_add_ext_cap(VFIOPCIDevice *vdev)
         case 0: /* kernel masked capability */
         case PCI_EXT_CAP_ID_SRIOV: /* Read-only VF BARs confuse OVMF */
         case PCI_EXT_CAP_ID_ARI: /* XXX Needs next function virtualization
*/
+        case PCI_EXT_CAP_ID_REBAR:
             trace_vfio_add_ext_cap_dropped(vdev->vbasedev.name, cap_id,
next);
             break;
         default:



On Mon, 26 Oct 2020 at 02:25, Roger Lawhorn <r...@twc.com> wrote:

> i use seabios.
> ovmf gives me troubles.
> i use amd threadripper cpu.
>
>
> On 10/25/20 7:32 AM, Ivan Volosyuk wrote:
> > Interesting. I never passed the rom option to my 2080 ti and it works
> > fine with windows 10. In January 2020 I was using qemu-4.0, since then
> > I swapped a few versions of qemu till 5.1 and it works fine without
> > the rom option. I use intel CPUs though. I wonder if that's the
> > difference.
> > I use edk2-ovmf though. I wasn't able to get it to work with seabios.
> >
> > On Sun, Oct 25, 2020 at 8:59 PM Roger Lawhorn <r...@twc.com> wrote:
> >> I tried pushing off my rtx 2080 to windows 10.
> >> Kept getting code 43.
> >>
> >> I added hv_time,kvm=off,hv_vendor_id=null  to my -cpu line and it fixed
> the issue.
> >> Just in case someone else has this issue.
> >> I also had to download a rom file that matched my video card.
> >> QEMU cannot get past the option rom execution without the rom file.
> >>
> >>
> >> Here is my code:
> >>
> >> qemu4.0-system-x86_64 -machine type=q35,accel=kvm -cpu
> EPYC,hv_time,kvm=off,hv_vendor_id=null \
> >> -chardev stdio,id=seabios -device
> isa-debugcon,iobase=0x402,chardev=seabios \
> >> -smp $1,sockets=1,cores=$1 \
> >> -global q35-pcihost.pci-hole64-size=11G \
> >> -bios /usr/share/seabios/bios.bin \
> >> -m 32G \
> >> -vga none \
> >> -soundhw hda \
> >> -mem-prealloc \
> >> -rtc clock=host,base=localtime \
> >> -device
> ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
> >> -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
> >>
> >>
> >>
> >>
> >> Where I got my rom file:
> >> https://www.techpowerup.com/vgabios/204970/palit-rtx2080ti-11264-180919
> >>
> >>
> >> _______________________________________________
> >> vfio-users mailing list
> >> vfio-users@redhat.com
> >> https://www.redhat.com/mailman/listinfo/vfio-users
>
> _______________________________________________
> vfio-users mailing list
> vfio-users@redhat.com
> https://www.redhat.com/mailman/listinfo/vfio-users
>
>
_______________________________________________
vfio-users mailing list
vfio-users@redhat.com
https://www.redhat.com/mailman/listinfo/vfio-users

Reply via email to