linux/arch/mips/kvm
Paolo Bonzini f3b65bbaed KVM: delete .change_pte MMU notifier callback
The .change_pte() MMU notifier callback was intended as an
optimization. The original point of it was that KSM could tell KVM to flip
its secondary PTE to a new location without having to first zap it. At
the time there was also an .invalidate_page() callback; both of them were
*not* bracketed by calls to mmu_notifier_invalidate_range_{start,end}(),
and .invalidate_page() also doubled as a fallback implementation of
.change_pte().

Later on, however, both callbacks were changed to occur within an
invalidate_range_start/end() block.

In the case of .change_pte(), commit 6bdb913f0a ("mm: wrap calls to
set_pte_at_notify with invalidate_range_start and invalidate_range_end",
2012-10-09) did so to remove the fallback from .invalidate_page() to
.change_pte() and allow sleepable .invalidate_page() hooks.

This however made KVM's usage of the .change_pte() callback completely
moot, because KVM unmaps the sPTEs during .invalidate_range_start()
and therefore .change_pte() has no hope of finding a sPTE to change.
Drop the generic KVM code that dispatches to kvm_set_spte_gfn(), as
well as all the architecture specific implementations.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Anup Patel <anup@brainfault.org>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Message-ID: <20240405115815.3226315-2-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-04-11 13:18:27 -04:00
..
emulate.c MIPS: Fix typos 2024-01-08 10:39:12 +01:00
entry.c MIPS: kvm/entry: Use GPR number macros 2024-02-20 12:41:52 +01:00
fpu.S MIPS: Always use -Wa,-msoft-float and eliminate GAS_HAS_SET_HARDFLOAT 2023-01-26 12:41:16 +09:00
hypcall.c KVM: MIPS: Implement HYPCALL emulation 2017-03-28 14:53:33 +01:00
interrupt.c MIPS: Remove KVM_TE support 2021-03-10 15:18:48 +01:00
interrupt.h MIPS: Remove KVM_TE support 2021-03-10 15:18:48 +01:00
Kconfig Merge branch 'kvm-kconfig' 2024-02-08 08:47:51 -05:00
loongson_ipi.c KVM: mips: Use kvm_get_vcpu() instead of open-coded access 2021-12-08 04:24:13 -05:00
Makefile KVM: MIPS: Hardcode callbacks to hardware virtualization extensions 2022-12-29 15:41:12 -05:00
mips.c KVM: Move kvm_arch_flush_remote_tlbs_memslot() to common code 2023-08-17 09:40:35 +01:00
mmu.c KVM: delete .change_pte MMU notifier callback 2024-04-11 13:18:27 -04:00
msa.S MIPS: KVM: Add base guest MSA support 2015-03-27 21:25:19 +00:00
stats.c MIPS: kvm: Fix build error with KVM_MIPS_DEBUG_COP0_COUNTERS enabled 2023-07-07 14:43:01 +02:00
tlb.c MIPS: fix typos in comments 2022-05-04 22:22:59 +02:00
trace.h MIPS: KVM: Fix NULL pointer dereference 2023-07-03 16:06:19 +02:00
vz.c MIPS: KVM: Fix NULL pointer dereference 2023-07-03 16:06:19 +02:00