History

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 <seanjc@google.com> Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Peter Gonda <pgonda@google.com>

Peter Gonda committed 4 years ago

Commit c24a9501 parent 9bd1f0e3 files · +22 −4Browse files

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

Unified · Split

include/uapi/linux/kvm.h+4−1
@@ -444,8 +444,11 @@ struct kvm_run { · 443 unmodified lines
444444 #define KVM_SYSTEM_EVENT_SHUTDOWN 1
445445 #define KVM_SYSTEM_EVENT_RESET 2
446446 #define KVM_SYSTEM_EVENT_CRASH 3
447+#define KVM_SYSTEM_EVENT_SEV_TERM 4
448+#define KVM_SYSTEM_EVENT_NDATA_VALID (1u << 31)
447449 __u32 type;
448− __u64 flags;
450+ __u32 ndata;
451+ __u64 data[16];
449452 } system_event;
450453 /* KVM_EXIT_S390_STSI */
451454 struct {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t