KVM: x86: Remove the KVM_GET_NR_MMU_PAGES ioctl
authorThomas Huth <thuth@redhat.com>
Wed, 8 Feb 2023 14:01:02 +0000 (15:01 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 16 Mar 2023 14:18:06 +0000 (10:18 -0400)
commitc5edd753a0bd6243a597f5199c227a50457ee179
tree97ac32a01375357a35638ee6e6d701cb430be073
parent71fb165e23e3b66e68ca7baab6c317c2663c32d5
KVM: x86: Remove the KVM_GET_NR_MMU_PAGES ioctl

The KVM_GET_NR_MMU_PAGES ioctl is quite questionable on 64-bit hosts
since it fails to return the full 64 bits of the value that can be
set with the corresponding KVM_SET_NR_MMU_PAGES call. Its "long" return
value is truncated into an "int" in the kvm_arch_vm_ioctl() function.

Since this ioctl also never has been used by userspace applications
(QEMU, Google's internal VMM, kvmtool and CrosVM have been checked),
it's likely the best if we remove this badly designed ioctl before
anybody really tries to use it.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230208140105.655814-4-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c
include/uapi/linux/kvm.h
tools/include/uapi/linux/kvm.h