KVM: SEV: fix compat ABI for KVM_MEMORY_ENCRYPT_OP
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 9 Feb 2024 18:37:33 +0000 (13:37 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 18 Mar 2024 23:03:52 +0000 (19:03 -0400)
commitf3c80061c0d35c60709088ccb019305796d3f6ff
tree1489ca2b81991d7ed4c0c67d4bc37c9015f809bc
parentc822a075ab2dbbcecb52b79331a5edd8395bdf4b
KVM: SEV: fix compat ABI for KVM_MEMORY_ENCRYPT_OP

The data structs for KVM_MEMORY_ENCRYPT_OP have different sizes for 32- and 64-bit
userspace, but they do not make any attempt to convert from one ABI to the other
when 32-bit userspace is running on 64-bit kernels.  This configuration never
worked, and SEV is only for 64-bit kernels so we're not breaking ABI on 32-bit
kernels.

Fix this by adding the appropriate padding; no functional change intended
for 64-bit userspace.

Reviewed-by: Michael Roth <michael.roth@amd.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/uapi/asm/kvm.h