kvm: replace __KVM_HAVE_READONLY_MEM with Kconfig symbol
KVM uses __KVM_HAVE_* symbols in the architecture-dependent uapi/asm/kvm.h to mask
unused definitions in include/uapi/linux/kvm.h. __KVM_HAVE_READONLY_MEM however
was nothing but a misguided attempt to define KVM_CAP_READONLY_MEM only on
architectures where KVM_CHECK_EXTENSION(KVM_CAP_READONLY_MEM) could possibly
return nonzero. This however does not make sense, and it prevented userspace
from supporting this architecture-independent feature without recompilation.
Therefore, these days __KVM_HAVE_READONLY_MEM does not mask anything and
is only used in virt/kvm/kvm_main.c. Userspace does not need to test it
and there should be no need for it to exist. Remove it and replace it
with a Kconfig symbol within Linux source code.
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
Showing
- arch/arm64/include/uapi/asm/kvm.h 0 additions, 1 deletionarch/arm64/include/uapi/asm/kvm.h
- arch/arm64/kvm/Kconfig 1 addition, 0 deletionsarch/arm64/kvm/Kconfig
- arch/loongarch/include/uapi/asm/kvm.h 0 additions, 2 deletionsarch/loongarch/include/uapi/asm/kvm.h
- arch/loongarch/kvm/Kconfig 1 addition, 0 deletionsarch/loongarch/kvm/Kconfig
- arch/mips/include/uapi/asm/kvm.h 0 additions, 2 deletionsarch/mips/include/uapi/asm/kvm.h
- arch/mips/kvm/Kconfig 1 addition, 0 deletionsarch/mips/kvm/Kconfig
- arch/riscv/include/uapi/asm/kvm.h 0 additions, 1 deletionarch/riscv/include/uapi/asm/kvm.h
- arch/riscv/kvm/Kconfig 1 addition, 0 deletionsarch/riscv/kvm/Kconfig
- arch/x86/include/uapi/asm/kvm.h 0 additions, 1 deletionarch/x86/include/uapi/asm/kvm.h
- arch/x86/kvm/Kconfig 1 addition, 0 deletionsarch/x86/kvm/Kconfig
- virt/kvm/Kconfig 3 additions, 0 deletionsvirt/kvm/Kconfig
- virt/kvm/kvm_main.c 1 addition, 1 deletionvirt/kvm/kvm_main.c
Please register or sign in to comment