Skip to content

Commit e80cd69

Browse files
committed
add support for TDX exit reason
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
1 parent d80807f commit e80cd69

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ioctls/vcpu.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ pub enum VcpuExit<'a> {
153153
X86Rdmsr(ReadMsrExit<'a>),
154154
/// Corresponds to KVM_EXIT_X86_WRMSR.
155155
X86Wrmsr(WriteMsrExit<'a>),
156+
/// Corresponds to KVM_EXIT_TDX
157+
Tdx,
156158
/// Corresponds to an exit reason that is unknown from the current version
157159
/// of the kvm-ioctls crate. Let the consumer decide about what to do with
158160
/// it.
@@ -1455,6 +1457,7 @@ impl VcpuFd {
14551457
}
14561458
}
14571459
KVM_EXIT_HYPERCALL => Ok(VcpuExit::Hypercall),
1460+
40 => Ok(VcpuExit::Tdx),
14581461
KVM_EXIT_DEBUG => {
14591462
// SAFETY: Safe because the exit_reason (which comes from the kernel) told us
14601463
// which union field to use.

0 commit comments

Comments
 (0)