]> git.baikalelectronics.ru Git - kernel.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)
commit1086bf49dca6006e483dc4a6c9a660016574a107
tree19c4128a92592a76fd7378ee3ef4994af866a25f
parente0ca7824d544a51961426d52c796a461ac428d84
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