mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
This API passes a u64 to a kernel API that treats the u64 as a userspace address. Therefore, it should be marked unsafe, but it currently is not [1]. Wrap the call in an unsafe block to document that invariants must be upheld to avoid undefined behavior. This causes a compiler warning, so suppress the warning with #[allow(unused_unsafe)]. [1]: https://github.com/rust-vmm/vfio/issues/100 Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>