(
&mut self,
region: &GuestRegionMmap<AtomicBitmap>,
)
| 235 | } |
| 236 | |
| 237 | pub fn dma_map( |
| 238 | &mut self, |
| 239 | region: &GuestRegionMmap<AtomicBitmap>, |
| 240 | ) -> Result<(), VfioUserPciDeviceError> { |
| 241 | let (fd, offset) = match region.file_offset() { |
| 242 | Some(_file_offset) => (_file_offset.file().as_raw_fd(), _file_offset.start()), |
| 243 | None => return Ok(()), |
| 244 | }; |
| 245 | |
| 246 | self.client |
| 247 | .lock() |
| 248 | .unwrap() |
| 249 | .dma_map(offset, region.start_addr().raw_value(), region.len(), fd) |
| 250 | .map_err(VfioUserPciDeviceError::DmaMap) |
| 251 | } |
| 252 | |
| 253 | pub fn dma_unmap( |
| 254 | &mut self, |