stage2_flush_vm(9)
π stage2_flush_vm(9) π
okay so bestie, youβve opened stage2_flush_vm(9) from the Kernel API Manual, and honestly? itβs giving small function, big cache-invalidate energy. β¨ No cap, this is the page about invalidating cache for pages mapped in stage 2.
πΈ NAME πΈ
stage2_flush_vmβ Invalidate cache for pages mapped in stage 2
π¦ SYNOPSIS π¦
void stage2_flush_vm (struct kvm *kvm );
π ARGUMENTS π
kvmβ Thestruct kvmpointer. Thatβs the pointer youβre handing over, bestie π«Ά
π DESCRIPTION π
So basically: go through the stage 2 page tables and invalidate any cache lines backing memory already mapped to the VM. Thatβs the whole assignment β stage 2 page tables get the walk-through, and any cache lines backing memory thatβs already mapped to the VM get invalidated. Periodt. π
π SEE ALSO π
Kernel file: ./arch/arm64/kvm/mmu.c
Hereβs the whole friend group, in order, no cap π
kvm_arch_flush_remote_tlbs(9)__unmap_stage2_range(9)free_hyp_pgds(9)create_hyp_mappings(9)hyp_alloc_private_va_range(9)create_hyp_io_mappings(9)create_hyp_exec_mappings(9)kvm_init_stage2_mmu(9)stage2_unmap_vm(9)kvm_phys_addr_ioremap(9)kvm_stage2_wp_range(9)kvm_mmu_wp_memory_region(9)kvm_mmu_split_memory_region(9)kvm_handle_guest_abort(9)
Signed off from the ./arch/arm64/kvm source corner, dated October 2026, with stage2_flush_vm(9) on the footer and main-character cache-flush energy β mwah πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms