qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VGA Passthrough


From: Jd Lyons
Subject: Re: VGA Passthrough
Date: Sat, 21 Mar 2020 11:27:07 -0400



On Mar 21, 2020, at 11:25 AM, Jd Lyons <address@hidden> wrote:



On Mar 21, 2020, at 10:44 AM, BALATON Zoltan <address@hidden> wrote:

On Fri, 20 Mar 2020, Jd Lyons wrote:
I’m using a version of Openbios that has the ATI code rom word patches.

The situation with PCI Passthrough is complicated, I’m using a PCI-E to PCI bridge, and I’m not sure how a VGA card needs to access it’s PCI bridge. With a PCI Firewire card in the same bridge, everything works as expected in qemu-system-ppc via PCI Passthrough.

However, there maybe something about VGA Passthrough that requires some bridge functions?

VFIO-PCI doesn’t support bridges, so their is no way to pass the bridge/adapter to Qemu.

Here is the host MMUIO group:

IOMMU Group 21 24:00.0 PCI bridge [0604]: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge [1b21:1080] (rev 04)
IOMMU Group 21 25:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Rage Fury/Xpert 128/Xpert 2000 AGP 2x [1002:5246]

Wait, you have an AGP card in a PCI bridge? Should this even work? I think accessing the system memory for bus master transfers work differently on PCI and AGP with AGP using GART and ATI cards using similar on PCI but probably not compatible. This would at least confuse drivers to find an AGP card on PCI bus and probably try to use GART which might not work (although I don't know it well so I might be wrong).

I also don't know vfio and passthrough but I've read something that whole iommu groups should be passed through? If that's true you may need to pass it together with the bridge but that likely won't work on g3beige and mac99 becuase those don't have PCIe so guests won't have drivers and can't use the bridge.

So I'm not sure what you're doing is even possible, some confirmation from someone who knows more about pass through would be welcome before trying to go deeper debugging it.

Regards,
BALATON Zoltan

No I have a PCI Rage128 GL in a PCI-E to PCI bridge, tho I did find an PCI-E to AGP bridge that I may order, they are rare, says it works with 3DFX cards.

I can’t pass the PCI-E to PCI bridge to Qemu, the VFIO-PCI driver won’t bind to it, tho it works perfectly fine with a Firewire PCI card, there maybe something about VGA that we don’t know yet.

I did find this:

Now we need to look at what other devices are in the group to free it for use by VFIO:

$ ls -l /sys/bus/pci/devices/0000:06:0d.0/iommu_group/devices
total 0
lrwxrwxrwx. 1 root root 0 Apr 23 16:13 0000:00:1e.0 ->
        ../../../../devices/pci0000:00/0000:00:1e.0
lrwxrwxrwx. 1 root root 0 Apr 23 16:13 0000:06:0d.0 ->
        ../../../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0
lrwxrwxrwx. 1 root root 0 Apr 23 16:13 0000:06:0d.1 ->
        ../../../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.1

This device is behind a PCIe-to-PCI bridge 4, therefore we also need to add device 0000:06:0d.1 to the group following the same procedure as above. Device 0000:00:1e.0 is a bridge that does not currently have a host driver, therefore it’s not required to bind this device to the vfio-pci driver (vfio-pci does not currently support PCI bridges).

My PCI-E to PCI bridge doesn’t have a host driver, and it won’t bind to VFIO-PCI, tho VFIO-PCI doesn’t give any errors or warnings about the bridge being in the same MMUIO Group and not being passed to Qemu, so I don’t think it matters, as I’ve seen these errors and warning before when I pass a device that has other devices in the MMUIO Group, because it can’t reset the device.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]