From 12c7cc5e4f1329bc066478a23c2bab0dbbed4a67 Mon Sep 17 00:00:00 2001 From: Demi Marie Obenour Date: Tue, 8 Jul 2025 14:04:32 -0400 Subject: [PATCH] pci: Remove dma_map() and dma_unmap() These APIs had no users, were not documented, and were unsound. Signed-off-by: Demi Marie Obenour --- pci/src/vfio.rs | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/pci/src/vfio.rs b/pci/src/vfio.rs index dcca015ab..30bf9fbfe 100644 --- a/pci/src/vfio.rs +++ b/pci/src/vfio.rs @@ -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 { self.common.mmio_regions.clone() }