linux/arch/x86
Avi Kivity 33f9c505ed KVM: VMX: Avoid rearranging switched guest msrs while they are loaded
KVM tries to run as much as possible with the guest msrs loaded instead of
host msrs, since switching msrs is very expensive.  It also tries to minimize
the number of msrs switched according to the guest mode; for example,
MSR_LSTAR is needed only by long mode guests.  This optimization is done by
setup_msrs().

However, we must not change which msrs are switched while we are running with
guest msr state:

 - switch to guest msr state
 - call setup_msrs(), removing some msrs from the list
 - switch to host msr state, leaving a few guest msrs loaded

An easy way to trigger this is to kexec an x86_64 linux guest.  Early during
setup, the guest will switch EFER to not include SCE.  KVM will stop saving
MSR_LSTAR, and on the next msr switch it will leave the guest LSTAR loaded.
The next host syscall will end up in a random location in the kernel.

Fix by reloading the host msrs before changing the msr list.

Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-03-04 15:19:50 +02:00
..
boot x86: handle BIOSes which terminate e820 with CF=1 and no SMAP 2008-02-26 12:55:52 +01:00
configs x86, core: remove CONFIG_FORCED_INLINING 2008-02-09 23:24:09 +01:00
crypto [CRYPTO] twofish: Merge common glue code 2008-01-14 17:07:57 +11:00
ia32 Sanitize the type of struct user.u_ar0 2008-02-07 08:42:30 -08:00
kernel x86: disable BTS ptrace extensions for now 2008-02-29 18:55:42 +01:00
kvm KVM: VMX: Avoid rearranging switched guest msrs while they are loaded 2008-03-04 15:19:50 +02:00
lguest x86/lguest: fix pgdir pmd index calculation 2008-02-26 12:55:49 +01:00
lib x86: clean up csum-wrappers_64.c some more 2008-02-19 16:18:32 +01:00
mach-default spelling fixes: arch/i386/ 2007-10-20 01:13:56 +02:00
mach-es7000 i386: es7000 minor cleanups 2007-10-17 20:16:15 +02:00
mach-generic spelling fixes: arch/i386/ 2007-10-20 01:13:56 +02:00
mach-rdc321x x86: add support for the RDC R-321x SoC 2008-01-30 13:33:36 +01:00
mach-visws x86: cleanup mpspec variants 2008-01-30 13:30:35 +01:00
mach-voyager calibrate_delay() must be __cpuinit 2008-02-06 10:41:08 -08:00
math-emu x86: arch/x86/math-emu/errors.c: fix printk warnings 2008-01-30 13:32:13 +01:00
mm x86: CPA: avoid split of alias mappings 2008-02-29 18:55:42 +01:00
oprofile x86: rename stack_pointer to kernel_trap_sp 2008-01-30 13:33:16 +01:00
pci PCI: irq: patch for Intel ICH10 DeviceID's 2008-02-21 15:34:36 -08:00
power x86 cleanup: suspend_asm_64.S - use X86_CR4_PGE instead of numeric value 2008-02-19 16:18:33 +01:00
vdso x86 vdso: fix build locale dependency 2008-02-29 18:55:39 +01:00
video i386: move video 2007-10-11 11:16:56 +02:00
xen xen: mask out SEP from CPUID 2008-02-29 18:55:43 +01:00
Kconfig Mark CC_STACKPROTECTOR as being BROKEN 2008-02-22 08:21:38 -08:00
Kconfig.cpu x86: don't use P6_NOPs if compiling with CONFIG_X86_GENERIC 2008-02-26 12:55:51 +01:00
Kconfig.debug x86: change IO delay back to 0x80 2008-02-19 16:18:34 +01:00
Makefile x86: fix vdso_install breaks user "make install" 2008-02-19 16:18:34 +01:00
Makefile_32.cpu x86: move i386 and x86_64 Makefiles to arch/x86 2007-10-25 22:27:34 +02:00