]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kvm: replace __KVM_HAVE_READONLY_MEM with Kconfig symbol
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Jan 2024 08:00:34 +0000 (03:00 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 8 Feb 2024 13:41:06 +0000 (08:41 -0500)
commit8886640dade4ae2595fcdce511c8bcc716aa47d3
treeffcf2f3b0e7c25fd1d9e8ddd3e37d462c9e4dc1c
parent5d9cb71642db11a5149c9a7234a9a62d387de449
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>
12 files changed:
arch/arm64/include/uapi/asm/kvm.h
arch/arm64/kvm/Kconfig
arch/loongarch/include/uapi/asm/kvm.h
arch/loongarch/kvm/Kconfig
arch/mips/include/uapi/asm/kvm.h
arch/mips/kvm/Kconfig
arch/riscv/include/uapi/asm/kvm.h
arch/riscv/kvm/Kconfig
arch/x86/include/uapi/asm/kvm.h
arch/x86/kvm/Kconfig
virt/kvm/Kconfig
virt/kvm/kvm_main.c