mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: modify or provide safety comments
Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
@@ -267,19 +267,31 @@ struct VirtioIommuFault {
|
||||
address: u64,
|
||||
}
|
||||
|
||||
// SAFETY: these data structures only contain integers and have no implicit padding
|
||||
// SAFETY: data structure only contain integers and have no implicit padding
|
||||
unsafe impl ByteValued for VirtioIommuRange32 {}
|
||||
// SAFETY: data structure only contain integers and have no implicit padding
|
||||
unsafe impl ByteValued for VirtioIommuRange64 {}
|
||||
// SAFETY: data structure only contain integers and have no implicit padding
|
||||
unsafe impl ByteValued for VirtioIommuConfig {}
|
||||
// SAFETY: data structure only contain integers and have no implicit padding
|
||||
unsafe impl ByteValued for VirtioIommuReqHead {}
|
||||
// SAFETY: data structure only contain integers and have no implicit padding
|
||||
unsafe impl ByteValued for VirtioIommuReqTail {}
|
||||
// SAFETY: data structure only contain integers and have no implicit padding
|
||||
unsafe impl ByteValued for VirtioIommuReqAttach {}
|
||||
// SAFETY: data structure only contain integers and have no implicit padding
|
||||
unsafe impl ByteValued for VirtioIommuReqDetach {}
|
||||
// SAFETY: data structure only contain integers and have no implicit padding
|
||||
unsafe impl ByteValued for VirtioIommuReqMap {}
|
||||
// SAFETY: data structure only contain integers and have no implicit padding
|
||||
unsafe impl ByteValued for VirtioIommuReqUnmap {}
|
||||
// SAFETY: data structure only contain integers and have no implicit padding
|
||||
unsafe impl ByteValued for VirtioIommuReqProbe {}
|
||||
// SAFETY: data structure only contain integers and have no implicit padding
|
||||
unsafe impl ByteValued for VirtioIommuProbeProperty {}
|
||||
// SAFETY: data structure only contain integers and have no implicit padding
|
||||
unsafe impl ByteValued for VirtioIommuProbeResvMem {}
|
||||
// SAFETY: data structure only contain integers and have no implicit padding
|
||||
unsafe impl ByteValued for VirtioIommuFault {}
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
|
||||
Reference in New Issue
Block a user