Re: [PATCH v21 03/15] KVM: arm64: Manage GCS access and registers for guests

From: Lorenzo Stoakes (ARM)

Date: Thu Oct 01 2026 - 07:28:38 EST


On Wed, Sep 30, 2026 at 10:48:13PM +0100, Mark Brown wrote:

> Reviewed-by: Leonardo Bras <leo.bras@xxxxxxx>
> Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>

With the preceding patch and the additional change below to extend the
invariant to GCS as well, the issue with incorrect save/restore is resolved
and this LGTM, so:

Reviewed-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>

> diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
> index 3ae293798b27..823460106de8 100644
> --- a/arch/arm64/kvm/sys_regs.c
> +++ b/arch/arm64/kvm/sys_regs.c

> @@ -5875,6 +5917,9 @@ static bool kvm_validate_id_regs(struct kvm *kvm)
> if (kvm_has_s1poe(kvm) && !kvm_has_tcr2(kvm))
> return false;
>
> + if (kvm_has_gcs(kvm) && !kvm_has_s1pie(kvm))
> + return false;

OK nice this extends the invariant to cover GCS as well!

--
Cheers, Lorenzo