File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -477,8 +477,8 @@ impl VcpuFd {
477
477
}
478
478
479
479
let mut cpuid = CpuId :: new ( num_entries) . map_err ( |_| errno:: Error :: new ( libc:: ENOMEM ) ) ?;
480
- // SAFETY: Here we trust the kernel not to read past the end of the kvm_cpuid2 struct.
481
480
let ret =
481
+ // SAFETY: Here we trust the kernel not to read past the end of the kvm_cpuid2 struct.
482
482
unsafe { ioctl_with_mut_ptr ( self , KVM_GET_CPUID2 ( ) , cpuid. as_mut_fam_struct_ptr ( ) ) } ;
483
483
if ret != 0 {
484
484
return Err ( errno:: Error :: last ( ) ) ;
@@ -1092,9 +1092,9 @@ impl VcpuFd {
1092
1092
/// ```
1093
1093
#[ cfg( any( target_arch = "arm" , target_arch = "aarch64" ) ) ]
1094
1094
pub fn get_reg_list ( & self , reg_list : & mut RegList ) -> Result < ( ) > {
1095
- // SAFETY: This is safe because we allocated the struct and we trust the kernel will read
1096
- // exactly the size of the struct.
1097
1095
let ret =
1096
+ // SAFETY: This is safe because we allocated the struct and we trust the kernel will read
1097
+ // exactly the size of the struct.
1098
1098
unsafe { ioctl_with_mut_ref ( self , KVM_GET_REG_LIST ( ) , reg_list. as_mut_fam_struct ( ) ) } ;
1099
1099
if ret < 0 {
1100
1100
return Err ( errno:: Error :: last ( ) ) ;
You can’t perform that action at this time.
0 commit comments