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

Lorenzo Stoakes (ARM) ljs at kernel.org
Thu Oct 1 04:28:12 PDT 2026


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

> Reviewed-by: Leonardo Bras <leo.bras at arm.com>
> Signed-off-by: Mark Brown <broonie at kernel.org>

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 at kernel.org>

> 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



More information about the linux-arm-kernel mailing list