[PATCH] RISC-V: KVM: Fix G-stage page table memory leak on VM destroy
James Morris
jmorris at namei.org
Sun Nov 8 23:50:16 PST 2026
On Sat, 31 Oct 2026, Yangyu Chen wrote:
> Fixes: 9d05c1fee837 ("RISC-V: KVM: Implement stage2 page table programming")
> Cc: stable at vger.kernel.org
> Signed-off-by: Yangyu Chen <cyy at cyyself.name>
Tested-by: James Morris <jmorris at namei.org>
Assisted by an LLM.
On a SpacemiT K3 CoM260 host (Sv39x4), a native port of your reproducer
showed about 16 MiB lost per VM on Fedora's 7.3.1 kernel. With the same
source rebuilt with this patch, each run averaged under 0.1 MiB lost per
VM (130 measured VMs total), consistent with noise. Both figures count
free pages held on the per-CPU lists as free.
--
James Morris
<jmorris at namei.org>
More information about the linux-riscv
mailing list