mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Itaru Kitayama <itaru.kitayama@fujitsu.com>
To: Mark Brown <broonie@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>, Joey Gouly <joey.gouly@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Shuah Khan <shuah@kernel.org>, Oliver Upton <oupton@kernel.org>,
	Ben Horgan <ben.horgan@arm.com>,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	kvm@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Lorenzo Stoakes (ARM)" <ljs@kernel.org>
Subject: Re: [PATCH v8 0/3] KVM: selftests: arm64: Improve diagnostics from set_id_regs
Date: Wed, 14 Oct 2026 16:40:15 +0900	[thread overview]
Message-ID: <as8x38o9taXgKZym@sm-arm-grace07> (raw)
In-Reply-To: <20260929-kvm-arm64-set-id-regs-aarch64-v8-0-58aabe2c2fac@kernel.org>

Hi Mark,
On Tue, Sep 29, 2026 at 05:16:51PM +0100, Mark Brown wrote:
> While debugging issues related to aarch64 only systems I ran into
> speedbumps due to the lack of detail in the results reported when the
> guest register read and reset value preservation tests were run, they
> generated an immediately fatal assert without indicating which register
> was being tested. Update these tests to non-fatally report a standard
> kselftest result per register, making it much easier to see what the
> problem being reported is.
> 
> A similar issue exists with the validation of the individual bitfields
> in registers due to the use of immediately fatal asserts. Update those
> asserts to be standard kselftest reports.
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
> Changes in v8:
> - Convert another assert.
> - Link to v7: https://patch.msgid.link/20260901-kvm-arm64-set-id-regs-aarch64-v7-0-7b065b0bda9a@kernel.org
> 
> Changes in v7:
> - Rebase onto v7.3-rc1.
> - Link to v6: https://patch.msgid.link/20260719-kvm-arm64-set-id-regs-aarch64-v6-0-724287f5f108@kernel.org
> 
> Changes in v6:
> - Rebase onto v7.2-rc3.
> - Drop changes to handling of aarch32 related registers on 64 bit only
>   systems, an in kernel solution is preferred for those.

I’ve reproduced the set_id_regs failure under QEMU with kvm-arm.mode=nested on 
a host that supports AArch32. KVM advertises the NV-capable L1 vCPU as AArch64-only, 
but aa32_id_visibility() still permits the inner KVM to expose ID_DFR0_EL1.CopDbg = 0xa 
to the selftest vCPU. The test expects zero because it skips setting expected 
values for AArch32 ID registers.

In v6 you mentioned preferring an in-kernel solution. What did you have in mind, 
given that changing the value returned by GET_ONE_REG may affect the userspace ABI?

Thanks,
Itaru.

> - Use a define to count the non-test_regs registers.
> - Link to v5: https://patch.msgid.link/20260317-kvm-arm64-set-id-regs-aarch64-v5-0-a60f2b956e22@kernel.org
> 
> Changes in v5:
> - Rebase onto v7.0-rc1.
> - Link to v4: https://patch.msgid.link/20260106-kvm-arm64-set-id-regs-aarch64-v4-0-c7ef4551afb3@kernel.org
> 
> Changes in v4:
> - Correct check for 32 bit ID registers.
> - Link to v3: https://patch.msgid.link/20251219-kvm-arm64-set-id-regs-aarch64-v3-0-bfa474ec3218@kernel.org
> 
> Changes in v3:
> - Rebase onto v6.19-rc1.
> - Link to v2: https://patch.msgid.link/20251114-kvm-arm64-set-id-regs-aarch64-v2-0-672f214f41bf@kernel.org
> 
> Changes in v2:
> - Add a fix for spurious failures with 64 bit only guests.
> - Link to v1: https://patch.msgid.link/20251030-kvm-arm64-set-id-regs-aarch64-v1-0-96fe0d2b178e@kernel.org
> 
> ---
> Mark Brown (3):
>       KVM: selftests: arm64: Report set_id_reg reads of test registers as tests
>       KVM: selftests: arm64: Report register reset tests individually
>       KVM: selftests: arm64: Make set_id_regs bitfield validity checks non-fatal
> 
>  tools/testing/selftests/kvm/arm64/set_id_regs.c | 130 ++++++++++++++++++------
>  1 file changed, 98 insertions(+), 32 deletions(-)
> ---
> base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
> change-id: 20251028-kvm-arm64-set-id-regs-aarch64-ebb77969401c
> 
> Best regards,
> --  
> Mark Brown <broonie@kernel.org>
> 

  parent reply	other threads:[~2026-10-14  7:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 16:16 Mark Brown
2026-09-29 16:16 ` [PATCH v8 1/3] KVM: selftests: arm64: Report set_id_reg reads of test registers as tests Mark Brown
2026-09-29 16:16 ` [PATCH v8 2/3] KVM: selftests: arm64: Report register reset tests individually Mark Brown
2026-09-29 16:16 ` [PATCH v8 3/3] KVM: selftests: arm64: Make set_id_regs bitfield validity checks non-fatal Mark Brown
2026-10-14  7:40 ` Itaru Kitayama [this message]
2026-10-14 10:32   ` [PATCH v8 0/3] KVM: selftests: arm64: Improve diagnostics from set_id_regs Mark Brown

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=as8x38o9taXgKZym@sm-arm-grace07 \
    --to=itaru.kitayama@fujitsu.com \
    --cc=ben.horgan@arm.com \
    --cc=broonie@kernel.org \
    --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=ljs@kernel.org \
    --cc=maz@kernel.org \
    --cc=oupton@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=shuah@kernel.org \
    --cc=suzuki.poulose@arm.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®