1
0
Fork 0
alistair23-linux/arch/x86
Paolo Bonzini b9dd21e104 KVM: x86: simplify handling of PKRU
Move it to struct kvm_arch_vcpu, replacing guest_pkru_valid with a
simple comparison against the host value of the register.  The write of
PKRU in addition can be skipped if the guest has not enabled the feature.
Once we do this, we need not test OSPKE in the host anymore, because
guest_CR4.PKE=1 implies host_CR4.PKE=1.

The static PKU test is kept to elide the code on older CPUs.

Suggested-by: Yang Zhang <zy107165@alibaba-inc.com>
Fixes: 1be0e61c1f
Cc: stable@vger.kernel.org
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-08-25 09:28:28 +02:00
..
boot x86/boot: Disable the address-of-packed-member compiler warning 2017-07-28 08:39:08 +02:00
configs x86/defconfig: Remove stale, old Kconfig options 2017-07-20 10:28:19 +02:00
crypto crypto: x86/sha1 - Fix reads beyond the number of blocks passed 2017-08-09 20:01:37 +08:00
entry x86/asm/64: Clear AC on NMI entries 2017-08-10 13:13:15 +02:00
events Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-08-20 09:36:52 -07:00
hyperv char/misc patches for 4.12-rc1 2017-05-04 19:15:35 -07:00
ia32 sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
include KVM: x86: simplify handling of PKRU 2017-08-25 09:28:28 +02:00
kernel Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-08-20 09:36:52 -07:00
kvm KVM: x86: simplify handling of PKRU 2017-08-25 09:28:28 +02:00
lguest Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 20:51:12 -07:00
lib include/linux/string.h: add the option of fortified string.h functions 2017-07-12 16:26:03 -07:00
math-emu x86/fpu/math-emu: Avoid bogus -Wint-in-bool-context warning 2017-07-20 10:46:24 +02:00
mm Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-08-20 09:36:52 -07:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
oprofile x86/oprofile/nmi: Convert to hotplug state machine 2016-11-22 23:34:43 +01:00
pci pci-v4.13-changes 2017-07-08 15:51:57 -07:00
platform x86: Mark various structures and functions as 'static' 2017-08-11 14:49:43 +02:00
power x86/boot/e820: Introduce the bootloader provided e820_table_firmware[] table 2017-07-05 10:09:02 +02:00
purgatory kasan: do not sanitize kexec purgatory 2017-03-31 17:13:30 -07:00
ras x86/mce: Merge mce_amd_inj into mce-inject 2017-06-14 07:32:07 +02:00
realmode x86/boot/64: Rename init_level4_pgt and early_level4_pgt 2017-06-13 08:56:55 +02:00
tools x86/tools: Fix gcc-7 warning in relocs.c 2016-12-19 11:50:24 +01:00
um Merge branch 'for-linus-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2017-07-15 10:49:33 -07:00
video
xen xen: fix hvm guest with kaslr enabled 2017-08-11 15:50:26 +02:00
.gitignore
Kbuild Drivers: hv vmbus: Move Hypercall page setup out of common code 2017-01-19 11:42:07 +01:00
Kconfig Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-08-20 08:54:30 -07:00
Kconfig.cpu
Kconfig.debug x86/platform: Add PCI dependency for PUNIT_ATOM_DEBUG 2017-07-20 10:46:24 +02:00
Makefile Kbuild updates for v4.13 2017-07-07 14:09:24 -07:00
Makefile.um
Makefile_32.cpu kbuild: remove cc-option-align 2017-06-25 12:43:00 +09:00