HomeFreeBSD

vtblk: Use busdma

Description

vtblk: Use busdma

We assume that bus addresses from busdma are the same thing as
"physical" addresses in the Virtio specification; this seems to
be true for the platforms on which Virtio is currently supported.

For block devices which are limited to a single data segment per
I/O, we request PAGE_SIZE alignment from busdma; this is necessary
in order to support unaligned I/Os from userland, which may cross
a boundary between two non-physically-contiguous pages. On devices
which support more data segments per I/O, we retain the existing
behaviour of limiting I/Os to (max data segs - 1) * PAGE_SIZE.

Reviewed by: bryanv
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D36667

Details

Provenance
cpercivaAuthored on Sep 21 2022, 7:34 PM
Reviewer
bryanv
Differential Revision
D36667: vtblk: Use busdma
Parents
rG3a8aff9d0879: vtblk: Include pointer to softc in request
Branches
Unknown
Tags
Unknown