]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
x86/fpu: Move KVMs FPU swapping to FPU core
authorThomas Gleixner <tglx@linutronix.de>
Fri, 15 Oct 2021 01:16:12 +0000 (03:16 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 20 Oct 2021 13:27:27 +0000 (15:27 +0200)
commita0ff0611c2fbde94f6c9db8351939b08f2cb6797
tree19c4128a92592a76fd7378ee3ef4994af866a25f
parent63cf05a19a5d3fb6e66b5f7ceb76e77dfc2695f2
x86/fpu: Move KVMs FPU swapping to FPU core

Swapping the host/guest FPU is directly fiddling with FPU internals which
requires 5 exports. The upcoming support of dynamically enabled states
would even need more.

Implement a swap function in the FPU core code and export that instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org
Link: https://lkml.kernel.org/r/20211015011539.076072399@linutronix.de
arch/x86/include/asm/fpu/api.h
arch/x86/include/asm/fpu/internal.h
arch/x86/kernel/fpu/core.c
arch/x86/kernel/fpu/init.c
arch/x86/kernel/fpu/xstate.c
arch/x86/kvm/x86.c
arch/x86/mm/extable.c