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.
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -375,6 +375,7 @@ struct kvm_run { · 374 unmodified lines | ||
| 375 | 375 | #define KVM_SYSTEM_EVENT_WAKEUP 4 |
| 376 | 376 | #define KVM_SYSTEM_EVENT_SUSPEND 5 |
| 377 | 377 | #define KVM_SYSTEM_EVENT_SEV_TERM 6 |
| 378 | +#define KVM_SYSTEM_EVENT_TDX_FATAL 7 | |
| 378 | 379 | __u32 type; |
| 379 | 380 | __u32 ndata; |
| 380 | 381 | union { |