Re: [patch 0/6] x86/fpu: Preparatory changes for guest AMX support

From: Paolo Bonzini
Date: Tue Dec 14 2021 - 05:42:48 EST


On 12/14/21 03:50, Thomas Gleixner wrote:
The only remaining issue is the KVM XSTATE save/restore size checking which
probably requires some FPU core assistance. But that requires some more
thoughts vs. the IOCTL interface extension and once that is settled it
needs to be solved in one go. But that's an orthogonal issue to the above.

That's not a big deal because KVM uses the uncompacted format. So KVM_CHECK_EXTENSION and KVM_GET_XSAVE can just use CPUID to retrieve the size and uncompacted offset of the largest bit that is set in kvm_supported_xcr0, while KVM_SET_XSAVE can do the same with the largest bit that is set in the xstate_bv.

Paolo



The series is also available from git:

git://git.kernel.org/pub/scm/linux/kernel/git/people/tglx/devel.git x86/fpu-kvm