summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/uapi
diff options
context:
space:
mode:
authorMichael Roth <michael.roth@amd.com>2024-05-01 02:10:48 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2024-05-07 13:28:05 -0400
commit4af663c2f64a8d252e690c60cf8b8abf22dc2951 (patch)
tree3e5d4cb911e47f8303126647a753b9b8b57fdc11 /arch/x86/include/uapi
parent8d1a36e42be6b0864c2c30f94536663b6f08fb48 (diff)
downloadlinux-stable-4af663c2f64a8d252e690c60cf8b8abf22dc2951.tar.gz
linux-stable-4af663c2f64a8d252e690c60cf8b8abf22dc2951.tar.bz2
linux-stable-4af663c2f64a8d252e690c60cf8b8abf22dc2951.zip
KVM: SEV: Allow per-guest configuration of GHCB protocol version
The GHCB protocol version may be different from one guest to the next. Add a field to track it for each KVM instance and extend KVM_SEV_INIT2 to allow it to be configured by userspace. Now that all SEV-ES support for GHCB protocol version 2 is in place, go ahead and default to it when creating SEV-ES guests through the new KVM_SEV_INIT2 interface. Keep the older KVM_SEV_ES_INIT interface restricted to GHCB protocol version 1. Suggested-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Michael Roth <michael.roth@amd.com> Message-ID: <20240501071048.2208265-5-michael.roth@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include/uapi')
-rw-r--r--arch/x86/include/uapi/asm/kvm.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/include/uapi/asm/kvm.h b/arch/x86/include/uapi/asm/kvm.h
index 72ad5ace118d..9fae1b73b529 100644
--- a/arch/x86/include/uapi/asm/kvm.h
+++ b/arch/x86/include/uapi/asm/kvm.h
@@ -711,7 +711,9 @@ struct kvm_sev_cmd {
struct kvm_sev_init {
__u64 vmsa_features;
__u32 flags;
- __u32 pad[9];
+ __u16 ghcb_version;
+ __u16 pad1;
+ __u32 pad2[8];
};
struct kvm_sev_launch_start {