From: Leonardo Bras <leo.bras@arm.com>
To: Usama Arif <usama.arif@linux.dev>
Cc: Leonardo Bras <leo.bras@arm.com>,
ljs@kernel.org, maz@kernel.org, oupton@kernel.org,
fuad.tabba@linux.dev, joey.gouly@arm.com, seiden@linux.ibm.com,
suzuki.poulose@arm.com, yuzenghui@huawei.com,
catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com,
kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, riel@surriel.com,
shakeel.butt@linux.dev, kernel-team@meta.com, rkeilty@meta.com,
atish.patra@linux.dev, dgreid@meta.com
Subject: Re: [PATCH v2] KVM: arm64: Size the stage-2 memcache from kvm_mmu_cache_min_pages()
Date: Wed, 2 Dec 2026 16:05:33 +0000 [thread overview]
Message-ID: <axBBzcEmztdE5ZHD@LeoBrasDK> (raw)
In-Reply-To: <20261202155915.2539852-1-usama.arif@linux.dev>
On Wed, Dec 02, 2026 at 07:59:06AM -0800, Usama Arif wrote:
> On Tue, 1 Dec 2026 18:19:42 +0000 Leonardo Bras <leo.bras@arm.com> wrote:
>
> > 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?
> >
>
> (Replying here instead of the previous email for this part of the thread.)
>
> Ah no limitation, and all the numbers are from a patched host kernel on
> the Grace host. Only the NV tests ran under TCG, and they only check
> for warnings. None of the performance numbers are from TCG.
>
> It's the same code, but only with NV does the vCPU's memcache also
> feed shadow stage-2s, which can be deeper than the VM's own stage-2.
> That's why a multiple of the VM's kvm_mmu_cache_min_pages() hits the
> WARN_ON_ONCE() with NV. IMO performance numbers are needed
> from NV for this, but if they are, could you help as I dont have
> hardware for it.
>
Ah, I get it now.
I think as long as your non-NV perf numbers are from real HW, it should
be fine. But sure, I can test it if it's relevant to anyone.
Thanks!
Leo
next prev parent reply other threads:[~2026-12-02 16:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 14:30 Usama Arif
2026-11-30 15:26 ` Leonardo Bras
2026-11-30 17:31 ` Usama Arif
2026-11-30 18:29 ` Leonardo Bras
2026-11-30 20:05 ` Usama Arif
2026-12-01 12:46 ` Leonardo Bras
2026-12-01 18:19 ` Leonardo Bras
2026-12-02 15:59 ` Usama Arif
2026-12-02 16:05 ` Leonardo Bras [this message]
2026-12-02 15:49 ` Usama Arif
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=axBBzcEmztdE5ZHD@LeoBrasDK \
--to=leo.bras@arm.com \
--cc=atish.patra@linux.dev \
--cc=catalin.marinas@arm.com \
--cc=dgreid@meta.com \
--cc=fuad.tabba@linux.dev \
--cc=joey.gouly@arm.com \
--cc=kernel-team@meta.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ljs@kernel.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=oupton@kernel.org \
--cc=riel@surriel.com \
--cc=rkeilty@meta.com \
--cc=seiden@linux.ibm.com \
--cc=shakeel.butt@linux.dev \
--cc=suzuki.poulose@arm.com \
--cc=usama.arif@linux.dev \
--cc=will@kernel.org \
--cc=yuzenghui@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®