Re: [PATCH v2] KVM: arm64: Size the stage-2 memcache from kvm_mmu_cache_min_pages()
From: Leonardo Bras
Date: Tue Dec 01 2026 - 13:19:55 EST
On Tue, Dec 01, 2026 at 12:46:22PM +0000, Leonardo Bras wrote:
> On Mon, Nov 30, 2026 at 08:05:32PM +0000, Usama Arif wrote:
[...]
> > >> I tried your MULTIPLIER * min_pages version under QEMU with
> > >> kvm-arm.mode=nested: 4K pages, an IPA limit of 52 bits, and a 40-bit
> > >> IPA VM whose L1 runs an L2. In all six runs, across two tests, L2's
> > >> first fault that needs a refill hits that WARN_ON_ONCE() and KVM_RUN
> > >> fails with EIO.
> > >
> > > Out of curiosity, is it fully KVM, or are you using QEMU to emulate a
> > > 4k-pagesize host?
> >
> >
> > QEMU emulates the host. I don't have hardware with FEAT_NV2, so L0 is a
> > 4K kernel booted with kvm-arm.mode=nested in qemu-system-aarch64 with
> > TCG (-cpu max, virtualization=on). Only the NV tests ran that way,
> > the numbers above are from the Grace host.
> >
>
> Ah, I see your point.
> The issue is that QEMU TCG is not really great for gathering performance
> numbers :(
>
> I can try running the tests for you in a NV2-enabled machine, if that's ok
> :)
>
Humm, but again, why do you need NV2? That path is tested on both
user_mem_abort and gmem_abort, it could easily be tested by replacing the
host kernel.
Do you have any limitation replacing the host kernel?
Thanks!
Leo