linux-stable/arch/x86
Avi Kivity daea3e73cb KVM: Make locked operations truly atomic
Once upon a time, locked operations were emulated while holding the mmu mutex.
Since mmu pages were write protected, it was safe to emulate the writes in
a non-atomic manner, since there could be no other writer, either in the
guest or in the kernel.

These days emulation takes place without holding the mmu spinlock, so the
write could be preempted by an unshadowing event, which exposes the page
to writes by the guest.  This may cause corruption of guest page tables.

Fix by using an atomic cmpxchg for these operations.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-05-17 12:15:39 +03:00
..
boot Merge branch 'x86-setup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-02-28 10:43:53 -08:00
configs
crypto include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ia32 x86: correctly wire up the newuname system call 2010-04-20 09:17:21 -07:00
include/asm KVM: x86: Use native_store_idt() instead of kvm_get_idt() 2010-05-17 12:15:28 +03:00
kernel Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-04-20 09:20:23 -07:00
kvm KVM: Make locked operations truly atomic 2010-05-17 12:15:39 +03:00
lguest lguest: stop using KVM hypercall mechanism 2010-04-14 21:43:56 +09:30
lib Merge branch 'x86-rwsem-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-02-28 10:41:35 -08:00
math-emu
mm Merge branch 'master' into export-slabh 2010-04-05 11:37:28 +09:00
oprofile perf, x86: rename macro in ARCH_PERFMON_EVENTSEL_ENABLE 2010-03-01 14:21:23 +01:00
pci include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
power Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip 2010-04-07 11:02:23 -07:00
tools x86: Remove trailing spaces in messages 2010-02-07 17:47:51 +01:00
vdso include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
video
xen include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
Kbuild
Kconfig x86: Increase CONFIG_NODES_SHIFT max to 10 2010-04-02 19:09:31 +02:00
Kconfig.cpu Merge branch 'x86-rwsem-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-02-28 10:41:35 -08:00
Kconfig.debug Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-12-11 20:47:30 -08:00
Makefile x86-64: Allow fbdev primary video code 2010-02-16 21:22:26 -08:00
Makefile_32.cpu Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-12-08 13:38:11 -08:00