linux/arch
Andy Lutomirski 5fb88e8803 x86,kvm,vmx: Preserve CR4 across VM entry
commit d974baa398 upstream.

CR4 isn't constant; at least the TSD and PCE bits can vary.

TBH, treating CR0 and CR3 as constant scares me a bit, too, but it looks
like it's correct.

This adds a branch and a read from cr4 to each vm entry.  Because it is
extremely likely that consecutive entries into the same vcpu will have
the same host cr4 value, this fixes up the vmcs instead of restoring cr4
after the fact.  A subsequent patch will add a kernel-wide cr4 shadow,
reducing the overhead in the common case to just two memory reads and a
branch.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Petr Matousek <pmatouse@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[wangkai: Backport to 3.10: adjust context]
Signed-off-by: Wang Kai <morgan.wang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-11 14:54:49 +08:00
..
alpha
arc ARC: Fix build breakage for !CONFIG_ARC_DW2_UNWIND 2015-01-29 17:40:50 -08:00
arm ARM: 8299/1: mm: ensure local active ASID is marked as allocated on rollover 2015-02-11 14:54:47 +08:00
arm64 arm64: Fix up /proc/cpuinfo 2015-02-11 14:54:48 +08:00
avr32
blackfin
c6x
cris
frv
hexagon
ia64
m32r
m68k m68k: Disable/restore interrupts in hwreg_present()/hwreg_write() 2014-10-30 09:38:21 -07:00
metag
microblaze
mips MIPS: Fix kernel lockup or crash after CPU offline/online 2015-02-11 14:54:46 +08:00
mn10300
openrisc
parisc parisc: fix out-of-register compiler error in ldcw inline assembler function 2015-01-27 08:18:55 -08:00
powerpc powerpc/xmon: Fix another endiannes issue in RTAS call from xmon 2015-02-05 22:35:49 -08:00
s390 crypto: prefix module autoloading with "crypto-" 2015-01-29 17:40:50 -08:00
score
sh sh: fix sh770x SCIF memory regions 2014-11-14 09:00:07 -08:00
sparc crypto: prefix module autoloading with "crypto-" 2015-01-29 17:40:50 -08:00
tile mm: page_alloc: convert hot/cold parameter and immediate callers to bool 2015-01-29 17:40:51 -08:00
um um: Skip futex_atomic_cmpxchg_inatomic() test 2015-01-27 08:18:58 -08:00
unicore32 mm: per-thread vma caching 2014-10-09 12:21:29 -07:00
x86 x86,kvm,vmx: Preserve CR4 across VM entry 2015-02-11 14:54:49 +08:00
xtensa xtensa: re-wire umount syscall to sys_oldumount 2014-11-21 09:23:01 -08:00
.gitignore
Kconfig