aboutsummaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorPeter Gonda <[email protected]>2022-04-07 14:02:33 -0700
committerPaolo Bonzini <[email protected]>2022-04-13 13:37:46 -0400
commitc24a950ec7d60c4da91dc3f273295c7f438b531e (patch)
tree826747f1331d720dca6b8677fc46e56069b7f6a7 /include/uapi/linux
parent9bd1f0efa859b61950d109b32ff8d529cc33a3ad (diff)
KVM, SEV: Add KVM_EXIT_SHUTDOWN metadata for SEV-ES
If an SEV-ES guest requests termination, exit to userspace with KVM_EXIT_SYSTEM_EVENT and a dedicated SEV_TERM type instead of -EINVAL so that userspace can take appropriate action. See AMD's GHCB spec section '4.1.13 Termination Request' for more details. Suggested-by: Sean Christopherson <[email protected]> Suggested-by: Paolo Bonzini <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Peter Gonda <[email protected]> Reported-by: kernel test robot <[email protected]> Message-Id: <[email protected]> [Add documentatino. - Paolo] Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/kvm.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 8616af85dc5d..dd1d8167e71f 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -444,8 +444,11 @@ struct kvm_run {
#define KVM_SYSTEM_EVENT_SHUTDOWN 1
#define KVM_SYSTEM_EVENT_RESET 2
#define KVM_SYSTEM_EVENT_CRASH 3
+#define KVM_SYSTEM_EVENT_SEV_TERM 4
+#define KVM_SYSTEM_EVENT_NDATA_VALID (1u << 31)
__u32 type;
- __u64 flags;
+ __u32 ndata;
+ __u64 data[16];
} system_event;
/* KVM_EXIT_S390_STSI */
struct {