I see PPC is defined in target/ppc/Kconfig so I think these mark the target not the host. Vfio-pci works with qemu-system-ppc

Ah ! I am surprised. Which host and QEMU machine please ?

I've seen people do this on x86_64 host with pegasos2, amigaone and mac99 
running 32 bit guests (AmigaOS and MacOS). Some people running older 32 bit 
Windows versions on pc machine might also use this.


I tried with :

    qemu-system-ppc -m 1G -smp 1 -M mac99,via=pmu -cpu g4  ....

There are some errors/warnings:

    qemu-system-ppc: -device vfio-pci,host=0000:0c:00.0: warning: MSI-X is not 
supported by interrupt controller
    Cannot manage 'ethernet controller' PCI device type 'network':
    >>
    >>  8086 10c9 (2 0 0)
    >> set_property: NULL phandle
>> =============================================================
    >> OpenBIOS 1.1 [Sep 24 2024 19:56]
    ...

but it does work :

    root@debian-powerpc:~# uname -a
    Linux debian-powerpc 6.1.0-7-powerpc #1 Debian 6.1.20-1 (2023-03-19) ppc 
GNU/Linux
    root@debian-powerpc:~# lspci -s  00:10.0 -vv
    00:10.0 Ethernet controller: Intel Corporation 82576 Gigabit Network 
Connection (rev 01)
        Subsystem: Beijing Sinead Technology Co., Ltd. 82576 Gigabit Network 
Connection
        Device tree node: 
/sys/firmware/devicetree/base/pci@f2000000/pci8086,10c9@10
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ 
Stepping- SERR+ FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- 
<MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 27
        Region 0: Memory at 82080000 (32-bit, non-prefetchable) [size=128K]
        Region 1: Memory at 82400000 (32-bit, non-prefetchable) [size=4M]
        Region 2: I/O ports at 1080 [size=32]
        Region 3: Memory at 82800000 (32-bit, non-prefetchable) [size=16K]
        Expansion ROM at 82c00000 [disabled] [size=4M]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA 
PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=1 PME-
        Capabilities: [a0] Express (v2) Endpoint, MSI 00
                DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s <512ns, L1 
<64us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ 
SlotPowerLimit 0W
                DevCtl: CorrErr- NonFatalErr- FatalErr+ UnsupReq-
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+ FLReset-
                        MaxPayload 256 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ 
TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x4, ASPM L0s L1, Exit Latency 
L0s <4us, L1 <64us
                        ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1 (downgraded)
                        TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Range ABCD, TimeoutDis+ NROPrPrP- 
LTR-
                         10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- 
EETLPPrefix-
                         EmergencyPowerReduction Not Supported, 
EmergencyPowerReductionInit-
                         FRS- TPHComp- ExtTPHComp-
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 16ms to 55ms, TimeoutDis- LTR- 
10BitTagReq- OBFF Disabled,
                         AtomicOpsCtl: ReqEn-
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- 
EqualizationPhase1-
                         EqualizationPhase2- EqualizationPhase3- 
LinkEqualizationRequest-
                         Retimer- 2Retimers- CrosslinkRes: unsupported
        Kernel driver in use: igb
        Kernel modules: igb
    root@debian-powerpc:~# ip link show dev enp0s16
    2: enp0s16: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP 
mode DEFAULT group default qlen 1000
        link/ether 80:61:5f:0a:2f:c4 brd ff:ff:ff:ff:ff:ff


The number of VFIO combinations drives me nuts. It's worse than PPC.

Thanks,

C.


Reply via email to