Re: [PATCH v2] KVM: arm64: Mask SErrors in a protected vCPU's host copy at first run
From: Fuad Tabba
Date: Tue Oct 06 2026 - 09:19:37 EST
Hi Oliver,
On Tue, 6 Oct 2026 at 15:15, Oliver Upton <oupton@xxxxxxxxxx> 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