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: Fri, 20 Mar 2020 15:00:12 -0400

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]

And here is what I’m doing with qemu:

sudo 'qemu-system-ppc' -m 1024 -hda 'XP.img'       -prom-env 'vga-ndrv?=false'  
-prom-env 'boot-args=-v debug=0xffe kdp=2'  -prom-env 'auto-boot?=false'        
-net nic,model=sungem -net user -device vfio-pci,host=25:00.0  -bios 
'/home/jam/openbios-qemu-activedevice-sungem-pci-map-in-rage128.elf'  -cdrom 
'/home/jam/Downloads/debian-31r8-powerpc-netinst.iso'    -boot d   -prom-env 
aapl,debug=3000000    -usb -device usb-host,hostbus=1,hostaddr=5  -device 
usb-host,hostbus=1,hostaddr=7 -hdb '/home/jam/os9/os9.2.img'  -M g3beige 
-nographic -vga none
C>> annot manage 'VGA controller' PCI device type 'display':
>>  1002 5246 (3 0 0)

>> =============================================================
>> OpenBIOS 1.1 [Aug 16 2019 21:49]
>> Configuration device id QEMU version 1 machine id 2
>> CPUs: 1
>> Memory: 1024M
>> UUID: 00000000-0000-0000-0000-000000000000
>> CPU type PowerPC,750
milliseconds isn't unique.
Welcome to OpenBIOS v1.1 built on Aug 16 2019 21:49

0 > dev /pci/@4  ok
0 > load /pci/mac-io/@20000/@1:,\ppc\ragepci  ok
0 > " /pci/@4" select-dev  ok
0 > 400003f 1 byte-load open isn't unique.
close isn't unique.
 ok
0 > boot hd:2,\yaboot >> switching to new context:


> On Mar 20, 2020, at 2:41 PM, BALATON Zoltan <address@hidden> wrote:
> 
> On Fri, 20 Mar 2020, Jd Lyons wrote:
>> I’ve been trying to get VGA Passthrough working on a Rage128 PCI Mac 
>> addition with system-ppc.
>> 
>> When booting to Mac OS X basic VGA functions work, however trying to enable 
>> 2d or 3d acceleration causes display corruption and makes the system 
>> unusable.
>> 
>> This also happens with Linux guests, fbdev works for both the tty and the 
>> x-server, but trying to enable DRI with the X11 “ati” driver results in 
>> display corruption and makes the system unusable.
>> 
>> I’m not sure how to debug this to figure out the corruption issue with 
>> VGA(PCI) Passthrough?
> 
> (Also cc-ing Gerd Hoffmann who is VGA and USB maintainer so may have more 
> knowledge about this.)
> 
> I'm not sure either how to debug pci passthrough but maybe you should give 
> more details on what did you did (what versions you used, command line, other 
> things necessary to reproduce what you did) and what errors you see otherwise 
> people probably could only give vague answers at best.
> 
> I've found this doc about passing through GPU but don't know how useful or 
> accurate is it:
> 
> https://github.com/intel/nemu/wiki/Testing-VFIO-with-GPU
> 
> You also may need to run the card ROM from OpenBIOS with my patches by hand 
> to correctly init the card which is not done automatically. We've done this 
> before while testing ati-vga with MacOS so I think you know about it and did 
> that. If the ROM is not run, the card may not be in the state expected by the 
> OS drivers.
> 
> Also the symptoms you get: works with frame buffer but not when enabling DRI 
> is similar to what I get with the incomplete ati-vga emulation and the reason 
> for that is not being able to use memory buffers accessed via bus master DMA:
> 
> https://osdn.net/projects/qmiga/ticket/40018
> 
> So maybe your case is similar, the real card of course has this capability 
> but maybe bus master DMA or accessing the memory buffers is not working for 
> some reason but I don't know how to check that. Maybe somebody has an idea 
> here?
> 
> Regards,
> BALATON Zoltan



reply via email to

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