MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / update_bypass

Method update_bypass

virtio-devices/src/iommu.rs:1205–1217  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

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);

Callers 1

write_configMethod · 0.80

Calls 1

feature_ackedMethod · 0.80

Tested by

no test coverage detected