From: Itaru Kitayama <itaru.kitayama@fujitsu.com>
To: Fuad Tabba <fuad.tabba@linux.dev>
Cc: Marc Zyngier <maz@kernel.org>, Oliver Upton <oupton@kernel.org>,
Joey Gouly <joey.gouly@arm.com>,
Steffen Eiden <seiden@linux.ibm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Shuah Khan <shuah@kernel.org>,
linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
kvm@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org,
Takayuki Okamoto <tokamoto@fujitsu.com>
Subject: Re: [PATCH 2/2] KVM: selftests: arm64: Add 52-bit VA guest modes
Date: Tue, 8 Sep 2026 06:24:45 +0900 [thread overview]
Message-ID: <ap8rnTINMJQqfYGL@sm-arm-grace07> (raw)
In-Reply-To: <CA+EHjTyJpPd8HjaWBw0V6pHF9UR0w2UFmaKDe7U3O+Sj8wiyPg@mail.gmail.com>
Hi Fuad,
On Fri, Sep 04, 2026 at 09:45:30AM +0100, Fuad Tabba wrote:
> Hi Itaru,
>
> On Tue, 25 Aug 2026 at 22:18, Itaru Kitayama <itaru.kitayama@fujitsu.com> wrote:
> ...
> > diff --git a/tools/testing/selftests/kvm/lib/arm64/processor.c b/tools/testing/selftests/kvm/lib/arm64/processor.c
> > index 9108e14a9b5b..bcdf670c9eb8 100644
> > --- a/tools/testing/selftests/kvm/lib/arm64/processor.c
> > +++ b/tools/testing/selftests/kvm/lib/arm64/processor.c
> > @@ -46,7 +46,7 @@ static u64 pud_index(struct kvm_vm *vm, gva_t gva)
> > u64 mask = (1UL << (vm->page_shift - 3)) - 1;
> >
> > TEST_ASSERT(vm->mmu.pgtable_levels >= 4,
> > - "Mode %d does not have at least 4 page table levels",
> > + "Mode %d does not have >= 4 page table levels",
>
> Patch 1 added this string one commit earlier. Could it go in with the
> final wording there?
Surely, will fix in v2.
>
> ...
>
> > @@ -298,10 +304,14 @@ struct kvm_vm *____vm_create(struct vm_shape shape)
> >
> > /* Setup mode specific traits. */
> > switch (vm->mode) {
> > + case VM_MODE_P52V52_4K:
> > + vm->mmu.pgtable_levels = 5;
> > + break;
>
> This is now the deepest mode, so page_fault_test.c's sizing is stale:
>
> * VM_MODE_P48V48_4K is the mode with most PT pages; let's use
> * twice that just in case.
> pt_size = 26 * guest_page_size;
>
> The margin still covers it. Could pt_size come from vm->mmu.pgtable_levels?
I'm not the author of the page_fault_test.c for arm64, but so I'm
guessing here; per the comment in the test, I dont think total number of
levels determines pt_size, rather by the addresses prepared for the
test.
This stress test does not require high virtual addresses, though should
we update the comment while at it?
Thanks,
Itaru.
>
> Cheers,
> /fuad
>
>
> > case VM_MODE_P52V48_4K:
> > vm->mmu.pgtable_levels = 4;
> > break;
> > case VM_MODE_P52V48_64K:
> > + case VM_MODE_P52V52_64K:
> > vm->mmu.pgtable_levels = 3;
> > break;
> > case VM_MODE_P48V48_4K:
> > @@ -322,6 +332,7 @@ struct kvm_vm *____vm_create(struct vm_shape shape)
> > case VM_MODE_P48V48_16K:
> > case VM_MODE_P40V48_16K:
> > case VM_MODE_P36V48_16K:
> > + case VM_MODE_P52V52_16K:
> > vm->mmu.pgtable_levels = 4;
> > break;
> > case VM_MODE_P47V47_16K:
> >
> > --
> > 2.43.0
> >
>
next prev parent reply other threads:[~2026-09-07 21:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-25 21:18 [PATCH 0/2] 52-bit VA guest mode ID support Itaru Kitayama
2026-08-25 21:18 ` [PATCH 1/2] KVM: selftest: arm64: Support 5-level paging in stage 1 translation table Itaru Kitayama
2026-09-04 8:38 ` Fuad Tabba
2026-09-08 1:44 ` Itaru Kitayama
2026-09-08 8:08 ` Fuad Tabba
2026-08-25 21:18 ` [PATCH 2/2] KVM: selftests: arm64: Add 52-bit VA guest modes Itaru Kitayama
2026-09-04 8:45 ` Fuad Tabba
2026-09-07 21:24 ` Itaru Kitayama [this message]
2026-09-08 8:08 ` Fuad Tabba
2026-09-04 2:55 ` [PATCH 0/2] 52-bit VA guest mode ID support Itaru Kitayama
2026-09-04 8:14 ` Fuad Tabba
2026-09-08 2:18 ` Itaru Kitayama
2026-09-08 7:55 ` Fuad Tabba
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=ap8rnTINMJQqfYGL@sm-arm-grace07 \
--to=itaru.kitayama@fujitsu.com \
--cc=fuad.tabba@linux.dev \
--cc=joey.gouly@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=maz@kernel.org \
--cc=oupton@kernel.org \
--cc=pbonzini@redhat.com \
--cc=seiden@linux.ibm.com \
--cc=shuah@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=tokamoto@fujitsu.com \
--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