[PATCH v3 1/7] KVM: arm64: Discard any SVE state when entering KVM guests

Mark Brown broonie at kernel.org
Tue Sep 20 13:21:33 PDT 2022


On Tue, Sep 20, 2022 at 05:44:01PM +0100, Marc Zyngier wrote:
> Mark Brown <broonie at kernel.org> wrote:

> >  void kvm_arch_vcpu_load_fp(struct kvm_vcpu *vcpu)
> >  {
> >  	BUG_ON(!current->mm);
> > -	BUG_ON(test_thread_flag(TIF_SVE));
> > +
> > +	fpsimd_kvm_prepare();
> 
> Why is this *before* the check against system_supports_fpsimd()? I
> don't think the architecture allows SVE without FP, for obvious
> reasons...

Good point, though now that I think about it I can't think of a
requirement for FP when implementing SME (there's certainly not
one for SVE).  There's no use for that hook now though.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220920/506abbaa/attachment.sig>


More information about the linux-arm-kernel mailing list