[vbox-dev] Patches for access width of IO ports in acpi, pci, vga device model

Alexander Boettcher alexander.boettcher at genode-labs.com
Tue Mar 4 09:20:39 GMT 2014


Hi,

we had for VBox at Genode/Nova to implement our own version of the IO
Monitor. During usage we detected some minor issues in the ACPI, PCI and
VGA device model between announced/registered IO ports access width and
its actual access width usage.

acpi.patch
- The access width of PM1a_EVT_OFFSET, PM1a_CTL_OFFSET, PM_TMR_OFFSET
are announced as 1 Byte, however are according to the ACPI Spec 4.0a
Chapter 4.7.3++ are the half of the PM1_EVT_LEN resp. PM1_CNT_LEN. We
adjusted the model accordingly.

acpi_more.patch
- The BAT_INDEX, BAT_DATA, SYSI_INDEX and SYSI_DATA is accessed 4 byte
wise and not only 1 byte.
- THE DEBUG_HEX, DEBUG_CHR is also accessed 4 byte wise. However to fix
that the DEBUG_CHR port must be changed. I don't know whether this has
influence to your debugging tools if they expect DEBUG_CHR to be 3001
instead of 3004?

devpci.patch
- port 0x0cf8 is access 4 byte wise

vga.patch
- several ports are accessed 2 byte wise instead of 1 byte. The changes
to the ports 0x1ce and 0x1cf are potentially not appropriate. They are
only 1 byte apart, but each port is accessed 2 byte wise, so I don't
know if this part of the patch is valid. Please check.


And some minor fixes regarding compile errors:

vmx_c++.patch
- The include header does not compile with C++ features enabled.

vmmdev.patch
- If VBOX_WITH_HGCM is not set, still some HGCM code is tried to be
compiled for VMMDev.cpp which fails. Set #ifdef accordingly.



Please review the patches and tell me whether they/some of them make
sense to you. They are in the first place non-critical, however our IOM
implementation complains/deny access by guests to device models if the
i/O access width is bigger than registered by the device model.

The patches are for virtualbox 4.2.16. If wanted I could also re-prepare
it so that they apply for the current version of VirtualBox.

Regards,

Alexander Boettcher.

The patches are provided according to the signed Oracle contributors
agreement by Genode Labs GmbH.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: acpi.patch
Type: text/x-diff
Size: 2412 bytes
Desc: not available
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20140304/cb22dc0e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: acpi_more.patch
Type: text/x-diff
Size: 1619 bytes
Desc: not available
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20140304/cb22dc0e/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: devpci.patch
Type: text/x-diff
Size: 559 bytes
Desc: not available
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20140304/cb22dc0e/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vga.patch
Type: text/x-diff
Size: 1674 bytes
Desc: not available
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20140304/cb22dc0e/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vmx_c++.patch
Type: text/x-diff
Size: 3730 bytes
Desc: not available
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20140304/cb22dc0e/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vmmdev.patch
Type: text/x-diff
Size: 680 bytes
Desc: not available
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20140304/cb22dc0e/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20140304/cb22dc0e/attachment.sig>


More information about the vbox-dev mailing list