Commit 8886640d authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

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: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 5d9cb716
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@

#define __KVM_HAVE_GUEST_DEBUG
#define __KVM_HAVE_IRQ_LINE
#define __KVM_HAVE_READONLY_MEM
#define __KVM_HAVE_VCPU_EVENTS

#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ menuconfig KVM
	select HAVE_KVM_IRQ_ROUTING
	select IRQ_BYPASS_MANAGER
	select HAVE_KVM_IRQ_BYPASS
	select HAVE_KVM_READONLY_MEM
	select HAVE_KVM_VCPU_RUN_PID_CHANGE
	select SCHED_INFO
	select GUEST_PERF_EVENTS if PERF_EVENTS
+0 −2
Original line number Diff line number Diff line
@@ -14,8 +14,6 @@
 * Some parts derived from the x86 version of this file.
 */

#define __KVM_HAVE_READONLY_MEM

#define KVM_COALESCED_MMIO_PAGE_OFFSET	1
#define KVM_DIRTY_LOG_PAGE_OFFSET	64

+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ config KVM
	select KVM_GENERIC_HARDWARE_ENABLING
	select KVM_GENERIC_MMU_NOTIFIER
	select KVM_MMIO
	select HAVE_KVM_READONLY_MEM
	select KVM_XFER_TO_GUEST_WORK
	help
	  Support hosting virtualized guest machines using
+0 −2
Original line number Diff line number Diff line
@@ -20,8 +20,6 @@
 * Some parts derived from the x86 version of this file.
 */

#define __KVM_HAVE_READONLY_MEM

#define KVM_COALESCED_MMIO_PAGE_OFFSET 1

/*
Loading