Re: [PATCH v4 09/15] KVM: SEV: sync FPU and AVX state at LAUNCH_UPDATE_VMSA time

From: Dave Hansen
Date: Tue Mar 19 2024 - 16:07:53 EST


On 3/18/24 16:33, Paolo Bonzini wrote:
> Since the XSAVE state for AVX is the first, it does not need the
> compacted-state handling of get_xsave_addr(). However, there are other
> parts of XSAVE state in the VMSA that currently are not handled, and
> the validation logic of get_xsave_addr() is pointless to duplicate
> in KVM, so move get_xsave_addr() to public FPU API; it is really just
> a facility to operate on XSAVE state and does not expose any internal
> details of arch/x86/kernel/fpu.

We don't want to grow _too_ many users of get_xsave_addr() since it's
hard to use it right. But this seems to be a legitimate user.

Acked-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>