VirtualBox

Opened 7 years ago

Last modified 7 years ago

#16385 new defect

PCI passthrought works incorrectly with I/O ports

Reported by: Matwey V. Kornilov Owned by:
Component: other Version: VirtualBox 5.0.20
Keywords: Cc:
Guest type: Linux Host type: Linux

Description

Hello,

I am using virtualBox 5.0.20 OSS with extension pack

# VBoxManage list extpacks Extension Packs: 1 Pack no. 0: Oracle VM VirtualBox Extension Pack Version: 5.0.20 Revision: 106931 Edition: Description: USB 2.0 and USB 3.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption. VRDE Module: VBoxVRDP Usable: true Why unusable:

Host kernel is 3.16.7 Guest kernel is 4.9.0

On the host machine I have the following PCI device:

04:00.0 0700: 1393:1320 (rev 02) (prog-if 80)

Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Interrupt: pin A routed to IRQ 19 Region 1: I/O ports at e080 [size=128] Region 2: I/O ports at e100 [size=64] Region 3: I/O ports at e140 [size=16] Kernel driver in use: pci-stub Kernel modules: mxser

When passed into the guest system it looks like the following:

03:00.0 0700: 1393:1320 (rev 02) (prog-if 80)

Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Interrupt: pin A routed to IRQ 17 Region 1: I/O ports at e000 [size=128] Region 2: I/O ports at e080 [size=64] Region 3: I/O ports at e0c0 [size=16]

However, access to I/O ports doesn't work in guest system.

To test I/O ports the following simple code snipped is used: https://gist.github.com/matwey/b42f8b9fb50ab8c603d120c54d04c9be

On the host (when accessed to 0xe100) result is the following:

# ./a.out 64: FF 00 01 00 00 60 90 00 FF 00 01 00 00 60 90 00 FF 00 01 00 00 60 90 00 FF 00 01 00 00 60 90 00 FF 00 01 00 00 60 90 00 FF 00 01 00 00 60 90 00 FF 00 01 00 00 60 90 00 FF 00 01 00 00 60 90 00

On the guest (when accessed to 0xe080) result is the following:

# ./a.out 64: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

Change History (1)

comment:1 by Matwey V. Kornilov, 7 years ago

I've updated both virtualbox and extensions pack to 5.0.30. But the behavior is the same.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use