In Win98 vm gpu driver issues with old ati gpu if it has BAR0: 64 bit, BAR4: I/O; no issue if it has BAR0: 32 bit, BAR1: I/O
Host environment
- Operating system: openSUSE Leap 15.6
- OS/kernel version: Linux 6.4.0-150600.21-default
- Architecture: x86 x84
- QEMU flavor: qemu-system-x86_64
- QEMU version: QEMU 9.2.50v9.2.0-2799-g0462a32b4f
- QEMU command line: qemu-system-x86_64 -machine pc -device "vfio-pci,host=08:00.0,x-vga=on,romfile=/home/radu/Desktop/vbios/x700.rom,multifunction=true,bus=pci.0,addr=02.0" -device "vfio-pci,host=08:00.1,bus=pci.0,addr=02.1" -drive file=/var/lib/libvirt/images/win98se.qcow2 -boot c -vga none -nic none -cpu host -enable-kvm -m 256
Emulated/Virtualized environment
- Operating system: win98se
- Architecture: x86
Description of problem
In win98se vm no errors in device manager,ati control panel complains that the driver is not loaded and desktop can only be used in 16 color 640x480. The problematic old ati gpus work correctly when booting win98 directly(no qemu vm, same host hardware)
Drivers fail to load in win98 vm for old ati gpu(x600, x700, x800, x850) that has:
Region 0: Memory at 4020000000 (64-bit, prefetchable) [size=256M]
Region 2: Memory at 41b30000 (64-bit, non-prefetchable) [size=64K]
Region 4: I/O ports at 3000 [size=256]
Expansion ROM at 41b00000 [disabled] [size=128K]
Old ati gpu(x300, x550) that have this, load/work correctly in win98 vm:
Region 0: Memory at 40000000 (32-bit, prefetchable) [size=64M]
Region 1: I/O ports at 3000 [size=256]
Region 2: Memory at 45b30000 (32-bit, non-prefetchable) [size=64K]
Expansion ROM at 45b00000 [disabled] [size=128K]
Additional information
I am using a QEMU build from branch master from a few days ago, with a fix for segfault when using 'x-vga=on' on some old ati gpu(Region 0: Memory at 40000000 (32-bit),Region 1: I/O ports) #2856 (closed). (Win98 gpu driver issues with old ati gpu if it has "BAR0: 64 bit, BAR4: I/O" was the same with QEMU version 9.12).
x700:
QEMU 9.2.50v9.2.0-2799-g0462a32b4f monitor> info pci:
Bus 0, device 2, function 0:
VGA controller: PCI device 1002:5e4d
PCI subsystem 148c:2129
IRQ 10, pin A
BAR0: 64 bit prefetchable memory at 0xe0000000 [0xefffffff].
BAR2: 64 bit memory at 0x00010000 [0x0001ffff].
BAR4: I/O at 0xc000 [0xc0ff].
BAR6: 32 bit memory at (not mapped)
id ""
Bus 0, device 2, function 1:
Display controller: PCI device 1002:5e6d
PCI subsystem 148c:2128
BAR0: 64 bit memory at 0xfebf0000 [0xfebfffff].
id ""
lspci -vv:
08:00.0 0300: 1002:5e4d VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV410 [Radeon X700] (prog-if 00 [VGA controller])
Subsystem: Tul Corporation / PowerColor Device 2129
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-
Interrupt: pin A routed to IRQ 16
Region 0: Memory at 4020000000 (64-bit, prefetchable) [size=256M]
Region 2: Memory at 41b30000 (64-bit, non-prefetchable) [size=64K]
Region 4: I/O ports at 3000 [size=256]
Expansion ROM at 41b00000 [disabled] [size=128K]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D3 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [58] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <256ns, L1 <4us
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE- FLReset- SlotPowerLimit 25.000W
DevCtl: Report errors: Correctable+ Non-Fatal+ Fatal+ Unsupported+
RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <256ns, L1 <2us
ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x4, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
HeaderLog: 40000001 00000003 000b0000 ffff0000
Kernel driver in use: vfio-pci
Kernel modules: radeon, amdgpu
08:00.1 0380: 1002:5e6d Display controller: Advanced Micro Devices, Inc. [AMD/ATI] RV410 [Radeon X700] (Secondary)
Subsystem: Tul Corporation / PowerColor Device 2128
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-
Region 0: Memory at 41b20000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D3 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [58] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <256ns, L1 <4us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset- SlotPowerLimit 0.000W
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <256ns, L1 <2us
ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x4, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
Kernel driver in use: vfio-pci
Kernel modules: amdgpu
x550:
QEMU 9.2.50v9.2.0-2799-g0462a32b4f monitor> info pci:
us 0, device 2, function 0:
VGA controller: PCI device 1002:5b63
PCI subsystem 174b:1500
IRQ 10, pin A
BAR0: 32 bit prefetchable memory at 0xef800000 [0xfbffffff].
BAR1: I/O at 0xc000 [0xc0ff].
BAR2: 32 bit memory at 0x00010000 [0xfebdffff].
BAR6: 32 bit memory at (not mapped)
id ""
Bus 0, device 2, function 1:
Display controller: PCI device 1002:5b73
PCI subsystem 174b:1501
BAR0: 32 bit memory at 0xfebf0000 [0xfebfffff].
id ""
lspci -vv:
08:00.0 1002:5b63 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV370 [Radeon X300/X550/X1050 Series] (prog-if 00 [VGA controller])
Subsystem: PC Partner Limited / Sapphire Technology Device 1500
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-
Interrupt: pin A routed to IRQ 16
Region 0: Memory at 40000000 (32-bit, prefetchable) [size=64M]
Region 1: I/O ports at 3000 [size=256]
Region 2: Memory at 45b30000 (32-bit, non-prefetchable) [size=64K]
Expansion ROM at 45b00000 [disabled] [size=128K]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D3 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [58] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <128ns, L1 <2us
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE- FLReset- SlotPowerLimit 25.000W
DevCtl: Report errors: Correctable+ Non-Fatal+ Fatal+ Unsupported+
RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <128ns, L1 <1us
ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
HeaderLog: 02000001 00000002 000003c8 037bbfae
Kernel driver in use: vfio-pci
Kernel modules: radeon, amdgpu
08:00.1 1002:5b73 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] RV370 [Radeon X300/X550/X1050 Series] (Secondary)
Subsystem: PC Partner Limited / Sapphire Technology Device 1501
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-
Region 0: Memory at 45b20000 (32-bit, non-prefetchable) [size=64K]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D3 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [58] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <128ns, L1 <2us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset- SlotPowerLimit 0.000W
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <128ns, L1 <1us
ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
Kernel driver in use: vfio-pci
Kernel modules: amdgpu
Edited by Radu Radu