[PATCH v2 1/2] KVM: arm64: Validate the host vCPU's VM before reading it under pKVM

Fuad Tabba fuad.tabba at linux.dev
Tue Sep 15 03:23:39 PDT 2026


Hi Joey,

On Tue, 15 Sept 2026 at 11:17, Joey Gouly <joey.gouly at arm.com> wrote:
[...]
> > -     if (kvm_has_mte(kern_hyp_va(vcpu->kvm)))
> > +     kvm = vcpu_get_kvm(vcpu);
> > +     if (kvm && kvm_has_mte(kvm))
>
> It's fine to use the "host->kvm" here because even if sets this bit on
> the host vCPU, the per-entry handlers in the other series won't copy
> across the TCO bit.
> Right?

Yes.

> >               new |= PSR_TCO_BIT;
> > +     vcpu_put_kvm(vcpu, kvm);
> >
> >       new |= (old & PSR_DIT_BIT);
> >
>
> [snip]
>
> Agree with the nits that Vincent suggested!
>
> Let's see if this sticks this time:
> Reviewed-by: Joey Gouly <joey.gouly at arm.com>

Carrying it over for the respin, thanks again!
/fuad

> Thanks,
> Joey



More information about the linux-arm-kernel mailing list