From: Andrew Jones <ajones@ventanamicro.com>
To: Joey Gouly <joey.gouly@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, nd@arm.com,
broonie@kernel.org, catalin.marinas@arm.com, james.morse@arm.com,
mark.rutland@arm.com, maz@kernel.org, oliver.upton@linux.dev,
shuah@kernel.org, suzuki.poulose@arm.com, will@kernel.org,
yuzenghui@huawei.com, haibo1.xu@intel.com
Subject: Re: [PATCH v4 20/20] KVM: selftests: get-reg-list: add Permission Indirection registers
Date: Wed, 19 Jul 2023 17:11:33 +0200 [thread overview]
Message-ID: <20230712-e563781672725ca058131775@orel> (raw)
In-Reply-To: <20230712145917.GA3526439@e124191.cambridge.arm.com>
On Wed, Jul 12, 2023 at 03:59:17PM +0100, Joey Gouly wrote:
> On Mon, Jul 03, 2023 at 02:03:45PM +0200, Andrew Jones wrote:
...
> > Any reason these registers needed to be added to the base reg set? Usually
> > new registers get added to their own sublist, which then get tested by
> > their own subtest.
>
> I added them to the base set because there is no feature/capability to enable PIE [1] (unlike SVE, PMU etc)
> That means they have to be part of the base set, otherwise the test will complain about missing regs.
>
Hi Joey,
Without the registers in a blessed list, then I wouldn't expect them to be
reported as 'missing', but rather as 'new' (and only when running on a
platform that supports them and with a recent enough KVM to have them
exposed). There are two ways to approach registers like these:
1) the way this patch has done it, i.e. add the registers to the "base"
list so they'll be expected by all subtests, ensuring they'll never
appear as 'new', but then also avoid false-positive 'missing' failures
by filtering them out of the missing list when necessary.
2) add the registers to subtests which only run when the registers
should be present (skipping the tests when not) and then always filter
the registers out of the 'new' list. (It's always safe to filter
explicitly defined registers out of the new list since "new" means new
to the selftest, but the selftest must be aware of those registers in
order to explicitly filter them, which means they can't be new :-)
To me, (2) is the cleaner approach, particularly because we've had subtest
skipping support and 'new' register filtering support from nearly the
beginning. riscv also has some nonconfigurable registers which are only
present when the platform supports them. The riscv get-one-reg series[1]
has taken approach (2) to handle those.
At some point maybe we can consider converting the permission indirection
registers to approach (2), but it's not critical to do anytime soon. So,
for now, we'll rebase the riscv series in a way that preserves using
approach (1) for aarch64, but also allows using approach (2) for riscv.
[1] https://lore.kernel.org/all/cover.1688010022.git.haibo1.xu@intel.com/
Thanks,
drew
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-07-19 15:11 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 14:58 [PATCH v4 00/20] Permission Indirection Extension Joey Gouly
2023-06-06 14:58 ` [PATCH v4 01/20] arm64/sysreg: Add ID register ID_AA64MMFR3 Joey Gouly
2023-06-06 14:58 ` [PATCH v4 02/20] arm64/sysreg: add system registers TCR2_ELx Joey Gouly
2023-06-06 14:58 ` [PATCH v4 03/20] arm64/sysreg: update HCRX_EL2 register Joey Gouly
2023-06-06 14:58 ` [PATCH v4 04/20] arm64/sysreg: add PIR*_ELx registers Joey Gouly
2023-06-06 14:58 ` [PATCH v4 05/20] arm64: cpufeature: add system register ID_AA64MMFR3 Joey Gouly
2023-06-06 14:58 ` [PATCH v4 06/20] arm64: cpufeature: add TCR2 cpucap Joey Gouly
2023-06-06 14:58 ` [PATCH v4 07/20] arm64: cpufeature: add Permission Indirection Extension cpucap Joey Gouly
2023-06-06 14:58 ` [PATCH v4 08/20] KVM: arm64: Save/restore TCR2_EL1 Joey Gouly
2023-06-06 14:58 ` [PATCH v4 09/20] KVM: arm64: Save/restore PIE registers Joey Gouly
2023-06-06 14:58 ` [PATCH v4 10/20] KVM: arm64: expose ID_AA64MMFR3_EL1 to guests Joey Gouly
2023-06-06 14:58 ` [PATCH v4 11/20] arm64: add PTE_UXN/PTE_WRITE to SWAPPER_*_FLAGS Joey Gouly
2023-06-06 14:58 ` [PATCH v4 12/20] arm64: add PTE_WRITE to PROT_SECT_NORMAL Joey Gouly
2023-06-06 14:58 ` [PATCH v4 13/20] arm64: reorganise PAGE_/PROT_ macros Joey Gouly
2023-08-22 14:10 ` Ard Biesheuvel
2023-08-24 10:14 ` Joey Gouly
2023-08-24 10:18 ` Ard Biesheuvel
2023-08-24 13:09 ` Joey Gouly
2023-08-28 10:30 ` Ard Biesheuvel
2023-06-06 14:58 ` [PATCH v4 14/20] arm64: disable EL2 traps for PIE Joey Gouly
2023-06-06 14:58 ` [PATCH v4 15/20] arm64: add encodings of PIRx_ELx registers Joey Gouly
2023-06-06 14:58 ` [PATCH v4 16/20] arm64: enable Permission Indirection Extension (PIE) Joey Gouly
2023-06-20 19:16 ` Neil Armstrong
2023-06-20 19:47 ` Joey Gouly
2023-06-20 20:27 ` Mark Brown
2023-06-20 20:41 ` Oliver Upton
2023-06-20 20:35 ` Marc Zyngier
2023-06-20 21:17 ` Trilok Soni
2023-06-06 14:58 ` [PATCH v4 17/20] arm64: transfer permission indirection settings to EL2 Joey Gouly
2023-06-06 14:58 ` [PATCH v4 18/20] arm64: Document boot requirements for PIE Joey Gouly
2023-06-06 14:58 ` [PATCH v4 19/20] KVM: selftests: get-reg-list: support ID register features Joey Gouly
2023-06-06 14:58 ` [PATCH v4 20/20] KVM: selftests: get-reg-list: add Permission Indirection registers Joey Gouly
2023-07-03 12:03 ` Andrew Jones
2023-07-12 14:59 ` Joey Gouly
2023-07-19 15:11 ` Andrew Jones [this message]
2023-06-06 17:29 ` [PATCH v4 00/20] Permission Indirection Extension Catalin Marinas
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=20230712-e563781672725ca058131775@orel \
--to=ajones@ventanamicro.com \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=haibo1.xu@intel.com \
--cc=james.morse@arm.com \
--cc=joey.gouly@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=nd@arm.com \
--cc=oliver.upton@linux.dev \
--cc=shuah@kernel.org \
--cc=suzuki.poulose@arm.com \
--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;
as well as URLs for NNTP newsgroup(s).