]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
KVM: fix direction of dependency on MMU notifiers
authorPaolo Bonzini <pbonzini@redhat.com>
Sat, 6 Jan 2024 07:24:00 +0000 (02:24 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 8 Jan 2024 13:09:38 +0000 (08:09 -0500)
KVM_GENERIC_MEMORY_ATTRIBUTES requires the generic MMU notifier code, because
it uses kvm_mmu_invalidate_begin/end.  However, it would not work with a bespoke
implementation of MMU notifiers that does not use KVM_GENERIC_MMU_NOTIFIER,
because most likely it would not synchronize correctly on invalidation.  So
the right thing to do is to note the problematic configuration if the
architecture does not select itself KVM_GENERIC_MMU_NOTIFIER; not to
enable it blindly.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/Kconfig

index ace72be98fb2040a353e5ca258674abf7a41b12c..184dab4ee871c6d2f54e1b095fab43c5f9f97e9a 100644 (file)
@@ -97,7 +97,7 @@ config KVM_GENERIC_MMU_NOTIFIER
        bool
 
 config KVM_GENERIC_MEMORY_ATTRIBUTES
-       select KVM_GENERIC_MMU_NOTIFIER
+       depends on KVM_GENERIC_MMU_NOTIFIER
        bool
 
 config KVM_PRIVATE_MEM