Re: [PATCH v22 03/16] KVM: arm64: Manage GCS access and registers for guests
From: Leonardo Bras
Date: Mon Nov 30 2026 - 11:49:40 EST
On Mon, Nov 30, 2026 at 04:35:44PM +0000, Mark Brown wrote:
> GCS introduces a number of system registers, on systems with GCS we need
> to context switch them and expose them to VMMs to allow guests to use
> GCS, including forwarding of traps for the EL2 registers with nested
> guests.
>
> Since the effects of GCSCR_ELx.EXLOCKEN are not controlled by
> HCRX_EL2.GCSEn we always load GCSCR_EL1 for guests, even if they are not
> using GCS.
>
> In order to allow guests to use GCS we also need to configure
> HCRX_EL2.GCSEn, if this is not set GCS instructions will be noops and
> CHKFEAT will report GCS as disabled.
>
> Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
As per [1], feel free to add my R-b.
Thx,
Leo
[1]https://lore.kernel.org/all/aphSYqKrgUq5Qycu@LeoBrasDK/