mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
pci: Remove dma_map() and dma_unmap()
These APIs had no users, were not documented, and were unsound. Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
This commit is contained in:
committed by
Rob Bradford
parent
8f6a6a85e0
commit
12c7cc5e4f
@@ -1764,26 +1764,6 @@ impl VfioPciDevice {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn dma_map(&self, iova: u64, size: u64, user_addr: u64) -> Result<(), VfioPciError> {
|
|
||||||
if !self.iommu_attached {
|
|
||||||
self.container
|
|
||||||
.vfio_dma_map(iova, size, user_addr)
|
|
||||||
.map_err(|e| VfioPciError::DmaMap(e, self.device_path.clone(), self.bdf))?;
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn dma_unmap(&self, iova: u64, size: u64) -> Result<(), VfioPciError> {
|
|
||||||
if !self.iommu_attached {
|
|
||||||
self.container
|
|
||||||
.vfio_dma_unmap(iova, size)
|
|
||||||
.map_err(|e| VfioPciError::DmaUnmap(e, self.device_path.clone(), self.bdf))?;
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn mmio_regions(&self) -> Vec<MmioRegion> {
|
pub fn mmio_regions(&self) -> Vec<MmioRegion> {
|
||||||
self.common.mmio_regions.clone()
|
self.common.mmio_regions.clone()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user