History

KVM: TDX: Handle TDG.VP.VMCALL<ReportFatalError>

Convert TDG.VP.VMCALL<ReportFatalError> to KVM_EXIT_SYSTEM_EVENT with a new type KVM_SYSTEM_EVENT_TDX_FATAL and forward it to userspace for handling. TD guest can use TDG.VP.VMCALL<ReportFatalError> to report the fatal error it has experienced. This hypercall is special because TD guest is requesting a termination with the error information, KVM needs to forward the hypercall to userspace anyway, KVM doesn't do parsing or conversion, it just dumps the 16 general-purpose registers to userspace and let userspace decide what to do.

Binbin Wu committed 1 year ago

Commit 79462fa1 parent 2c304883 files · +35 −0Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/linux/kvm.h+1−0
@@ -375,6 +375,7 @@ struct kvm_run { · 374 unmodified lines
375375 #define KVM_SYSTEM_EVENT_WAKEUP 4
376376 #define KVM_SYSTEM_EVENT_SUSPEND 5
377377 #define KVM_SYSTEM_EVENT_SEV_TERM 6
378+#define KVM_SYSTEM_EVENT_TDX_FATAL 7
378379 __u32 type;
379380 __u32 ndata;
380381 union {