linux-loongson/arch/arm64/kvm/hyp/include/nvhe
Vincent Donnefort c353fde17d KVM: arm64: np-guest CMOs with PMD_SIZE fixmap
With the introduction of stage-2 huge mappings in the pKVM hypervisor,
guest pages CMO is needed for PMD_SIZE size. Fixmap only supports
PAGE_SIZE and iterating over the huge-page is time consuming (mostly due
to TLBI on hyp_fixmap_unmap) which is a problem for EL2 latency.

Introduce a shared PMD_SIZE fixmap (hyp_fixblock_map/hyp_fixblock_unmap)
to improve guest page CMOs when stage-2 huge mappings are installed.

On a Pixel6, the iterative solution resulted in a latency of ~700us,
while the PMD_SIZE fixmap reduces it to ~100us.

Because of the horrendous private range allocation that would be
necessary, this is disabled for 64KiB pages systems.

Suggested-by: Quentin Perret <qperret@google.com>
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Signed-off-by: Quentin Perret <qperret@google.com>
Link: https://lore.kernel.org/r/20250521124834.1070650-11-vdonnefort@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
2025-05-21 14:33:51 +01:00
..
early_alloc.h KVM: arm64: Introduce an early Hyp page allocator 2021-03-19 12:01:20 +00:00
ffa.h KVM: arm64: Update the identification range for the FF-A smcs 2024-06-14 20:28:30 +00:00
gfp.h KVM: arm64: Make hyp_page::order a u8 2024-12-20 09:43:59 +00:00
mem_protect.h KVM: arm64: Add a range to __pkvm_host_test_clear_young_guest() 2025-05-21 14:33:51 +01:00
memory.h KVM: arm64: Introduce for_each_hyp_page 2025-05-21 14:33:51 +01:00
mm.h KVM: arm64: np-guest CMOs with PMD_SIZE fixmap 2025-05-21 14:33:51 +01:00
pkvm.h KVM: arm64: Create each pKVM hyp vcpu after its corresponding host vcpu 2025-03-14 16:06:03 -07:00
spinlock.h KVM: arm64: Add hyp_spinlock_t static initializer 2022-11-11 16:40:54 +00:00
trap_handler.h KVM: arm64: Move pkvm_vcpu_init_traps() to init_pkvm_hyp_vcpu() 2024-10-31 18:45:24 +00:00