File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,8 @@ pub enum VcpuExit<'a> {
184
184
/// size
185
185
size : u64 ,
186
186
} ,
187
+ /// Corresponds to KVM_EXIT_RISCV_SBI
188
+ RiscvSbi ( & ' a mut kvm_run__bindgen_ty_1__bindgen_ty_24 ) ,
187
189
/// Corresponds to an exit reason that is unknown from the current version
188
190
/// of the kvm-ioctls crate. Let the consumer decide about what to do with
189
191
/// it.
@@ -1641,6 +1643,13 @@ impl VcpuFd {
1641
1643
Ok ( VcpuExit :: IoapicEoi ( eoi. vector ) )
1642
1644
}
1643
1645
KVM_EXIT_HYPERV => Ok ( VcpuExit :: Hyperv ) ,
1646
+ #[ cfg( target_arch = "riscv64" ) ]
1647
+ KVM_EXIT_RISCV_SBI => {
1648
+ // SAFETY: Safe because the exit_reason (which comes from the kernel) told us
1649
+ // which union field to use.
1650
+ let riscv_sbi = unsafe { & mut run. __bindgen_anon_1 . riscv_sbi } ;
1651
+ Ok ( VcpuExit :: RiscvSbi ( riscv_sbi) )
1652
+ }
1644
1653
r => Ok ( VcpuExit :: Unsupported ( r) ) ,
1645
1654
}
1646
1655
} else {
You can’t perform that action at this time.
0 commit comments