[PATCH v2 3/4] KVM: arm64: pkvm: Reset GICv3 LRs in the hypervisor

Fuad Tabba fuad.tabba at linux.dev
Thu Oct 22 10:37:05 PDT 2026


Hi Vincent,

On Thu, 22 Oct 2026 15:00:47 +0100, Vincent Donnefort <vdonnefort at google.com> wrote:
> After the host is deprivileged, pKVM can't trust the host for resetting
> the vGIC LRs whose value is architecturally UNKNOWN when the CPU boots
> or resumes. Add a blanket cover in the CPU_ON/CPU_SUSPEND path.
>
> Fixes: cdf367192766 ("KVM: arm64: Intercept host's CPU_ON SMCs")

Could you point this at 1025c8c0c6ac ("KVM: arm64: Wrap the host with a
stage 2") instead? The message relies on the host not being trusted, and
that starts there.

[...]
> diff --git a/arch/arm64/kvm/hyp/nvhe/psci-relay.c b/arch/arm64/kvm/hyp/nvhe/psci-relay.c
[...]
> @@ -213,6 +213,10 @@ static void __noreturn __kvm_host_psci_cpu_entry(unsigned long pc, unsigned long
>          write_sysreg_el1(INIT_SCTLR_EL1_MMU_OFF, SYS_SCTLR);
>          write_sysreg(INIT_PSTATE_EL1, SPSR_EL2);
>  
> +        /* We can't trust the host to reset those registers */

nit: "those registers" -> "the LRs".

With the Fixes: tag updated:
Reviewed-by: Fuad Tabba <fuad.tabba at linux.dev>
Tested-by: Fuad Tabba <fuad.tabba at linux.dev>

Cheers,
/fuad



More information about the linux-arm-kernel mailing list