Structures for talking about memory shared between virtio devices and drivers
Drivers, located in the guest, and devices, located in the host, operate with shared memory, but may use different addresses to access it. All addresses published into the virtio data structures are published by the driver and so refer to memory addresses as understood by the driver.
It is the responsibility of the host to know how to turn an address published by the driver,
DriverRange, into memory that can be ultimately be dereferenced and read/written to by
this device code, i.e. a
DriverMem trait defines an interface for
performing this translation, although it is the responsibility of the application code to
provide and pass in implementations of this trait.
- Represents a range of memory as seen from the device.
- Represents a range of memory as seen from the driver.