All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Itaru Kitayama" <itaru.kitayama@fujitsu.com>
Cc: kvmarm@lists.linux.dev, "Marc Zyngier" <maz@kernel.org>,
	kvm@vger.kernel.org, "Oliver Upton" <oupton@kernel.org>
Subject: Re: [PATCH v2 1/3] KVM: arm64: selftests: Support five-level stage-1 page tables
Date: Mon, 14 Sep 2026 07:44:04 +0000	[thread overview]
Message-ID: <20260914074404.D220E1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260914-arm64-52bit-va-v2-1-3911cb9d4ad4@fujitsu.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The `type` array in `pte_dump` is missing the entry for P4D, causing it to print an empty string for level 0.
--

commit ec0c73a180f67ed464cb14e88f74413194ff828e
Author: Itaru Kitayama <itaru.kitayama@fujitsu.com>

KVM: arm64: selftests: Support five-level stage-1 page tables

This commit adds support for five-level stage-1 page tables in the ARM64
KVM selftests. It extends the page-table helpers and level validation to
handle the new architectural level -1. This enables testing 52-bit VA
configurations with a 4K translation granule.

> diff --git a/tools/testing/selftests/kvm/lib/arm64/processor.c b/tools/testing/selftests/kvm/lib/arm64/processor.c
> index 01325bf4d36fc..b589368bf8222 100644
> --- a/tools/testing/selftests/kvm/lib/arm64/processor.c
> +++ b/tools/testing/selftests/kvm/lib/arm64/processor.c

[ ... ]

> @@ -214,7 +249,7 @@ u64 *virt_get_pte_hva_at_level(struct kvm_vm *vm, gva_t gva, int level)
>  			goto unmapped_gva;
>  		break;
>  	default:
> -		TEST_FAIL("Page table levels must be 2, 3, or 4");
> +		TEST_FAIL("Page table levels must be 2, 3, 4, or 5");
>  	}
>  
>  	return ptep;

[Severity: Low]
Does this change miss updating the string names in pte_dump()?

Looking at pte_dump() in tools/testing/selftests/kvm/lib/arm64/processor.c,
the type array maps the translation level to its string name:

	static const char * const type[] = { "", "pud", "pmd", "pte" };

When the test framework is compiled with DEBUG and dumps a 5-level page
table, virt_arch_dump() calculates the starting level for pte_dump() as 0.
Since the array was not updated to include "p4d", debug output for level 0
will print an empty string instead of "p4d".

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260914-arm64-52bit-va-v2-0-3911cb9d4ad4@fujitsu.com?part=1

  reply	other threads:[~2026-09-14  7:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14  7:30 [PATCH v2 0/3] 52-bit VA guest mode ID support Itaru Kitayama
2026-09-14  7:30 ` [PATCH v2 1/3] KVM: arm64: selftests: Support five-level stage-1 page tables Itaru Kitayama
2026-09-14  7:44   ` sashiko-bot [this message]
2026-09-14  7:30 ` [PATCH v2 2/3] KVM: arm64: selftests: Add 52-bit VA guest modes Itaru Kitayama
2026-09-14  7:30 ` [PATCH v2 3/3] KVM: arm64: selftests: Test 52-bit guest virtual addresses Itaru Kitayama

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=20260914074404.D220E1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=itaru.kitayama@fujitsu.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=oupton@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.