We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38b6133 commit 983d7daCopy full SHA for 983d7da
kvm-ioctls/src/ioctls/vcpu.rs
@@ -1694,6 +1694,8 @@ impl VcpuFd {
1694
KVM_EXIT_HYPERV => Ok(VcpuExit::Hyperv),
1695
#[cfg(target_arch = "riscv64")]
1696
KVM_EXIT_RISCV_SBI => {
1697
+ // SAFETY: Safe because the exit_reason (which comes from the kernel) told us
1698
+ // which union field to use and the type of extension_id is 'enum sbi_ext_id'.
1699
match unsafe {run.__bindgen_anon_1.riscv_sbi.extension_id} as u32 {
1700
SBI_EXT_0_1_CONSOLE_PUTCHAR => {
1701
let ch = unsafe { run.__bindgen_anon_1.riscv_sbi.args[0] };
0 commit comments