diff options
author | Sean Christopherson <seanjc@google.com> | 2023-10-27 20:21:48 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-11-13 11:29:09 +0100 |
commit | 4a2e993faad3880962540ab8e3b68f22e48b18e8 (patch) | |
tree | 33bae983cad6eb6a83b71cc959afb1591fed5410 /arch/powerpc/kvm | |
parent | KVM: PPC: Drop dead code related to KVM_ARCH_WANT_MMU_NOTIFIER (diff) | |
download | linux-4a2e993faad3880962540ab8e3b68f22e48b18e8.tar.xz linux-4a2e993faad3880962540ab8e3b68f22e48b18e8.zip |
KVM: PPC: Return '1' unconditionally for KVM_CAP_SYNC_MMU
Advertise that KVM's MMU is synchronized with the primary MMU for all
flavors of PPC KVM support, i.e. advertise that the MMU is synchronized
when CONFIG_KVM_BOOK3S_HV_POSSIBLE=y but the VM is not using hypervisor
mode (a.k.a. PR VMs). PR VMs, via kvm_unmap_gfn_range_pr(), do the right
thing for mmu_notifier invalidation events, and more tellingly, KVM
returns '1' for KVM_CAP_SYNC_MMU when CONFIG_KVM_BOOK3S_HV_POSSIBLE=n
and CONFIG_KVM_BOOK3S_PR_POSSIBLE=y, i.e. KVM already advertises a
synchronized MMU for PR VMs, just not when CONFIG_KVM_BOOK3S_HV_POSSIBLE=y.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20231027182217.3615211-7-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r-- | arch/powerpc/kvm/powerpc.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index b0a512ede764..8d3ec483bc2b 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -635,11 +635,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) #if !defined(CONFIG_MMU_NOTIFIER) || !defined(KVM_ARCH_WANT_MMU_NOTIFIER) BUILD_BUG(); #endif -#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE - r = hv_enabled; -#else r = 1; -#endif break; #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE case KVM_CAP_PPC_HTAB_FD: |