Page MenuHomeFreeBSD

virtio_mmio: Support non-transitional version 2 devices
ClosedPublic

Authored by jrtc27 on May 4 2020, 1:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
May 10 2024, 8:48 PM
Unknown Object (File)
May 10 2024, 5:58 PM
Unknown Object (File)
Apr 11 2024, 10:38 AM
Unknown Object (File)
Apr 11 2024, 6:51 AM
Unknown Object (File)
Mar 18 2024, 9:48 AM
Unknown Object (File)
Jan 29 2024, 12:46 AM
Unknown Object (File)
Dec 21 2023, 8:46 PM
Unknown Object (File)
Dec 20 2023, 6:45 AM

Details

Summary

The non-legacy virtio MMIO specification drops the use of PFNs and
replaces them with physical addresses. Whilst many implementations are
so-called transitional devices, also implementing the legacy
specification, TinyEMU does not. Device-specific configuration registers
have also changed to being little-endian, and must be accessed using a
single aligned access for registers up to 32 bits, and two 32-bit
aligned accesses for 64-bit registers.

(rwatson: Adding TinyEMU URL: https://bellard.org/tinyemu/)

Test Plan

Still boots a riscv64 kernel on QEMU. Needs testing with QEMU's legacy MMIO
disabled. Also boots on a TinyEMU-derived system that previously did not boot.
However, TinyEMU itself will not work, since it does not generate responses for
unrecognised block request types, rather than giving VIRTIO_BLK_S_UNSUPP, so
our VIRTIO_BLK_T_GET_ID on boot never completes and we wait forever.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jrtc27 requested review of this revision.May 4 2020, 1:06 AM
rwatson added subscribers: brooks, jhb, trasz.
rwatson added a subscriber: bryanv.

Looks good at a glance. Adding a couple more potential reviewers.

I tested in tinyemu. It works.
(tinyemu supports version 2 only)

This revision is now accepted and ready to land.May 6 2020, 10:48 AM