[PATCH RFC v3 09/27] KVM: arm64: Factor SVE guest exit handling out into a function
Mark Rutland
mark.rutland at arm.com
Wed Jan 22 03:56:41 PST 2025
On Wed, Jan 22, 2025 at 11:51:00AM +0000, Marc Zyngier wrote:
> On Fri, 17 Jan 2025 11:34:09 +0000, Mark Rutland <mark.rutland at arm.com> wrote:
> > The TL;DR summary is that it's not sufficient for kvm_arch_vcpu_put_fp()
> > to fix up ZCR_ELx. Either:
> >
> > * That needs to be fixed up while IRQs are masked, e.g. by
> > saving/restoring the host and guest ZCR_EL1 and/or ZCR_ELx values in
> > kvm_arch_vcpu_ctxflush_fp() and kvm_arch_vcpu_ctxsync_fp()
> >
> > * The lazy save logic in fpsimd_save_user_state() needs to handle KVM
> > explicitly, saving the guest's ZCR_EL1 and restoring the host's
> > ZCR_ELx.
> >
> > I think we need to fix that before we extend this logic for SME.
>
> So save/restore ZCR_ELx eagerly? If that's what it takes, let's do
> that now.
I believe that's sufficient; I'll go double-check and spin that now.
Mark.
More information about the linux-arm-kernel
mailing list