]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Add compat handler for KVM_X86_SET_MSR_FILTER
authorAlexander Graf <graf@amazon.com>
Mon, 17 Oct 2022 18:45:41 +0000 (20:45 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 22 Oct 2022 09:16:04 +0000 (05:16 -0400)
commitedd49e8307e0b1854ceac5e8549e759ca901148e
tree351395344e8bd60715500862634ade16cd985622
parent2eb66b22ad0f68d04cb19adf5eadd39d00d22c43
KVM: x86: Add compat handler for KVM_X86_SET_MSR_FILTER

The KVM_X86_SET_MSR_FILTER ioctls contains a pointer in the passed in
struct which means it has a different struct size depending on whether
it gets called from 32bit or 64bit code.

This patch introduces compat code that converts from the 32bit struct to
its 64bit counterpart which then gets used going forward internally.
With this applied, 32bit QEMU can successfully set MSR bitmaps when
running on 64bit kernels.

Reported-by: Andrew Randrianasulu <randrianasulu@gmail.com>
Fixes: aad6adf4e3df4 ("KVM: x86: Introduce MSR filtering")
Signed-off-by: Alexander Graf <graf@amazon.com>
Message-Id: <20221017184541.2658-4-graf@amazon.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c