[PATCH v2] KVM: arm64: Mask SErrors in a protected vCPU's host copy at first run

Fuad Tabba fuad.tabba at linux.dev
Tue Oct 6 06:18:49 PDT 2026


Hi Oliver,

On Tue, 6 Oct 2026 at 15:15, Oliver Upton <oupton at kernel.org> wrote:
[...]
> > +
> > +             *vcpu_cpsr(vcpu) |= PSR_A_BIT;
> > +             __vcpu_rmw_sys_reg(vcpu, SCTLR2_EL1, &=, ~SCTLR2_EL1_NMEA);
> >       }
>
> Urgh, I hadn't realized that PSTATE.A is still modifiable by userspace
> prior to KVM_RUN. In that case, I would prefer the vcpu_has_nv()
> approach that I had recommended as a backup.

Sure. I'll respin with that.

Cheers,
/fuad

> FWIW, since pVMs do not implement FEAT_SCTLR2 it should not be able to
> write to the register at all.
>
> Thanks,
> Oliver



More information about the linux-arm-kernel mailing list