Linux KVM/arm64 development list
 help / color / mirror / Atom feed
From: Zenghui Yu <yuzenghui@huawei.com>
To: Ben Horgan <ben.horgan@arm.com>
Cc: Zenghui Yu <zenghui.yu@linux.dev>, <kvmarm@lists.linux.dev>,
	<linux-arm-kernel@lists.infradead.org>, <maz@kernel.org>,
	<oliver.upton@linux.dev>, <joey.gouly@arm.com>,
	<suzuki.poulose@arm.com>
Subject: Re: [PATCH] KVM: arm64: selftests: Sync ID_AA64PFR1, MPIDR, CLIDR in guest
Date: Tue, 14 Oct 2025 14:59:21 +0800	[thread overview]
Message-ID: <f71d620a-87c9-7cd3-425b-e6052a38e268@huawei.com> (raw)
In-Reply-To: <75f13087-80fa-45cb-9327-aa85522203e0@arm.com>

On 2025/10/14 0:14, Ben Horgan wrote:
> 
> 
> On 10/13/25 13:20, Ben Horgan wrote:
> > Hi Zenghui,
> >
> > On 10/12/25 16:43, Zenghui Yu wrote:
> > > We forgot to sync several registers (ID_AA64PFR1, MPIDR, CLIDR) in guest to
> > > make sure that the guest had seen the written value.
> > >
> > > Add them to the list.
> > >
> > > Signed-off-by: Zenghui Yu <zenghui.yu@linux.dev>
> > > ---
> > >  tools/testing/selftests/kvm/arm64/set_id_regs.c | 3 +++
> > >  1 file changed, 3 insertions(+)
> > >
> > > diff --git a/tools/testing/selftests/kvm/arm64/set_id_regs.c b/tools/testing/selftests/kvm/arm64/set_id_regs.c
> > > index 8ff1e853f7f8..5e24f77868b5 100644
> > > --- a/tools/testing/selftests/kvm/arm64/set_id_regs.c
> > > +++ b/tools/testing/selftests/kvm/arm64/set_id_regs.c
> > > @@ -249,11 +249,14 @@ static void guest_code(void)
> > >  	GUEST_REG_SYNC(SYS_ID_AA64ISAR2_EL1);
> > >  	GUEST_REG_SYNC(SYS_ID_AA64ISAR3_EL1);
> > >  	GUEST_REG_SYNC(SYS_ID_AA64PFR0_EL1);
> > > +	GUEST_REG_SYNC(SYS_ID_AA64PFR1_EL1);
> > >  	GUEST_REG_SYNC(SYS_ID_AA64MMFR0_EL1);
> > >  	GUEST_REG_SYNC(SYS_ID_AA64MMFR1_EL1);
> > >  	GUEST_REG_SYNC(SYS_ID_AA64MMFR2_EL1);
> > >  	GUEST_REG_SYNC(SYS_ID_AA64MMFR3_EL1);
> > >  	GUEST_REG_SYNC(SYS_ID_AA64ZFR0_EL1);
> > > +	GUEST_REG_SYNC(SYS_MPIDR_EL1);
> > > +	GUEST_REG_SYNC(SYS_CLIDR_EL1);
> >
> > Why did you choose this position in the list for these 2?

Technically there are no restrictions on the order. I just want it to
look consistent with test_reset_preserves_id_regs().

> >
> >>  	GUEST_REG_SYNC(SYS_CTR_EL0);
> >>  	GUEST_REG_SYNC(SYS_MIDR_EL1);
> >>  	GUEST_REG_SYNC(SYS_REVIDR_EL1);
> >
> > Looks good to me.
> >
> > Reviewed-By: Ben Horgan <ben.horgan@arm.com>

Thanks!

> On running this, I note test_guest_reg_read() doesn't announce its
> presence. How about adding a ksft_test_result_pass("%s\n", __func__) and
> bumping the number of tests?

Yup, I agreed.

Thanks,
Zenghui

  reply	other threads:[~2025-10-14  6:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-12 15:43 [PATCH] KVM: arm64: selftests: Sync ID_AA64PFR1, MPIDR, CLIDR in guest Zenghui Yu
2025-10-13 12:20 ` Ben Horgan
2025-10-13 16:14   ` Ben Horgan
2025-10-14  6:59     ` Zenghui Yu [this message]
2025-10-13 16:56 ` Marc Zyngier

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=f71d620a-87c9-7cd3-425b-e6052a38e268@huawei.com \
    --to=yuzenghui@huawei.com \
    --cc=ben.horgan@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=suzuki.poulose@arm.com \
    --cc=zenghui.yu@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox