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> {
184184 /// size
185185 size : u64 ,
186186 } ,
187+ /// Corresponds to KVM_EXIT_RISCV_SBI
188+ RiscvSbi ( & ' a mut kvm_run__bindgen_ty_1__bindgen_ty_24 ) ,
187189 /// Corresponds to an exit reason that is unknown from the current version
188190 /// of the kvm-ioctls crate. Let the consumer decide about what to do with
189191 /// it.
@@ -1641,6 +1643,13 @@ impl VcpuFd {
16411643 Ok ( VcpuExit :: IoapicEoi ( eoi. vector ) )
16421644 }
16431645 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+ }
16441653 r => Ok ( VcpuExit :: Unsupported ( r) ) ,
16451654 }
16461655 } else {
You can’t perform that action at this time.
0 commit comments