CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2026/05/31 14:28:51
Modified files:
usr.sbin/vmd : virtio.c
Log message:
Fix vmd(8) emulation for Linux guests.
The memory safety checks introduced in previous commit were too
strict and broke Linux guests running on top of vmd. Adapt the
checks to the variation of virtio 1.x that vmd implements.
virtio 1.x doesn't need page alignment. The used area offset needs
to just be 4 byte aligned for some sanity, but not really critical.
The descriptor table, available area, and used areas must be in
guest memory ranges and not spill out allowing guest access to host
memory by using hvaddr_mem() to check.
from dv@; OK mlarkin@; tested by jmatthew@ and Remi Bougard