Re: [PATCH 1/2] KVM: arm64: Fix spurious warning for benign stage 2 teardown race

"Lorenzo Stoakes (ARM)" <[email protected]>
Newsgroups dev.linux.lists.kvmarm,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <aoK7vLOD3oKKAxH0@lucifer>
On Mon, Aug 17, 2026 at 08:38:37AM +0800, Yao Yuan wrote:
> On Fri, Aug 14, 2026 at 09:48:39AM +0800, Lorenzo Stoakes (ARM) wrote:
> > OK so - I confused myself here :)
> >
> > The underlying issue here is that I am working back from a situation where
> > I can't quite recall what I did, but am rather reconstructing it based on
> > what was observed.
> >
> > And you're right - this stack makes no sense for an L2 VM being torn down,
> > rather only the L0 being torn down.
> >
> > So clearly this is what I did, and the correction should be to say this at
> > the start of the commit message.
>
> Ah I see.  I agree the race is there. Below is just an idea
> in my mind for reproducing this, hope this is helpful to you :-)
>
> migratepages (https://man7.org/linux/man-pages/man8/migratepages.8.html) can
> help to trigger the MMU notifier to qemu/kvmtool easily on 2P system, meanwhile
> kill the qemu/kvmtool on L0 to reprouduce the racing. For 1P system kernel has
> numa=fake parameter to generate more NUMAs there.
>

Ah nice thanks! There's also /proc/sys/vm/compact_memory so you can do:

$ echo 1 | sudo tee /proc/sys/vm/compact_memory

To trigger immediate memory compaction (and thus migration) also :)

--
Cheers, Lorenzo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.