(&mut self)
| 1203 | } |
| 1204 | |
| 1205 | fn update_bypass(&mut self) { |
| 1206 | // Use bypass from config if VIRTIO_IOMMU_F_BYPASS_CONFIG has been negotiated |
| 1207 | if !self |
| 1208 | .common |
| 1209 | .feature_acked(VIRTIO_IOMMU_F_BYPASS_CONFIG.into()) |
| 1210 | { |
| 1211 | return; |
| 1212 | } |
| 1213 | |
| 1214 | let bypass = self.config.bypass == 1; |
| 1215 | info!("Updating bypass mode to {bypass}"); |
| 1216 | self.mapping.bypass.store(bypass, Ordering::Release); |
| 1217 | } |
| 1218 | |
| 1219 | pub fn add_external_mapping(&mut self, device_id: u32, mapping: Arc<dyn ExternalDmaMapping>) { |
| 1220 | self.ext_mapping.lock().unwrap().insert(device_id, mapping); |
no test coverage detected