x86/fpu: Rework copy_xstate_to_uabi_buf()
authorThomas Gleixner <tglx@linutronix.de>
Fri, 15 Oct 2021 01:16:15 +0000 (03:16 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 20 Oct 2021 13:27:27 +0000 (15:27 +0200)
commitca834defd33bae9cf9542ff92b15635a84e91946
treeb18f6092eff4e6f07719f78c030e37618c343c27
parentea4d6938d4c0761672ff6237964a20db3cb95cc1
x86/fpu: Rework copy_xstate_to_uabi_buf()

Prepare for replacing the KVM copy xstate to user function by extending
copy_xstate_to_uabi_buf() with a pkru argument which allows the caller to
hand in the pkru value, which is required for KVM because the guest PKRU is
not accessible via current. Fixup all callsites accordingly.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20211015011539.191902137@linutronix.de
arch/x86/kernel/fpu/xstate.c
arch/x86/kernel/fpu/xstate.h