x86/pkru: Remove xstate fiddling from write_pkru()
authorThomas Gleixner <tglx@linutronix.de>
Wed, 23 Jun 2021 12:02:23 +0000 (14:02 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 23 Jun 2021 17:55:51 +0000 (19:55 +0200)
commit72a6c08c44e4460e39315ca828f60b8d5afd6b19
tree385a8cb9ee0dc549709a9afd559e3095cd645db1
parent0e8c54f6b2c8b1037cef9276e451522ee90ed969
x86/pkru: Remove xstate fiddling from write_pkru()

The PKRU value of a task is stored in task->thread.pkru when the task is
scheduled out. PKRU is restored on schedule in from there. So keeping the
XSAVE buffer up to date is a pointless exercise.

Remove the xstate fiddling and cleanup all related functions.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210623121456.897372712@linutronix.de
arch/x86/include/asm/pkru.h
arch/x86/include/asm/special_insns.h
arch/x86/kvm/x86.c