mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-09-19 05:20:55 +00:00
12 lines
527 B
Rust
12 lines
527 B
Rust
|
/// Trait meant for triggering the DMA mapping update related to an external
|
||
|
/// device not managed fully through virtio. It is dedicated to virtio-iommu
|
||
|
/// in order to trigger the map update anytime the mapping is updated from the
|
||
|
/// guest.
|
||
|
pub trait ExternalDmaMapping: Send + Sync {
|
||
|
/// Map a memory range
|
||
|
fn map(&self, iova: u64, gpa: u64, size: u64) -> std::result::Result<(), std::io::Error>;
|
||
|
|
||
|
/// Unmap a memory range
|
||
|
fn unmap(&self, iova: u64, size: u64) -> std::result::Result<(), std::io::Error>;
|
||
|
}
|