linux-kernel-test/arch
Avi Kivity f7d9c7b7b9 KVM: MMU: Fix race when instantiating a shadow pte
For improved concurrency, the guest walk is performed concurrently with other
vcpus.  This means that we need to revalidate the guest ptes once we have
write-protected the guest page tables, at which point they can no longer be
modified.

The current code attempts to avoid this check if the shadow page table is not
new, on the assumption that if it has existed before, the guest could not have
modified the pte without the shadow lock.  However the assumption is incorrect,
as the racing vcpu could have modified the pte, then instantiated the shadow
page, before our vcpu regains control:

  vcpu0        vcpu1

  fault
  walk pte

               modify pte
               fault in same pagetable
               instantiate shadow page

  lookup shadow page
  conclude it is old
  instantiate spte based on stale guest pte

We could do something clever with generation counters, but a test run by
Marcelo suggests this is unnecessary and we can just do the revalidation
unconditionally.  The pte will be in the processor cache and the check can
be quite fast.

Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-03-04 15:19:49 +02:00
..
alpha Introduce path_put() 2008-02-14 21:13:33 -08:00
arm Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2008-02-29 15:18:44 -08:00
avr32 avr32: Fix OCD refcounting bug 2008-02-27 14:23:53 +01:00
blackfin [Blackfin] arch: kill section mismatch warnings 2008-02-29 12:02:10 +08:00
cris cris: import memset.c from newlib: fixes compile error with newer (pre4.3) gcc 2008-02-14 20:58:04 -08:00
frv FRV: Change the timerfd syscalls to be the same as i386 2008-02-20 19:58:16 -08:00
h8300 h8300: defconfig update 2008-02-23 17:12:16 -08:00
ia64 [IA64] Fix build for sim_defconfig 2008-02-11 13:23:46 -08:00
m32r ide: introduce HAVE_IDE 2008-02-09 10:46:40 +01:00
m68k ide: introduce HAVE_IDE 2008-02-09 10:46:40 +01:00
m68knommu m68knommu: fix profile timer 2008-02-14 20:58:05 -08:00
mips [MIPS] BCM47XX: Use new SSB SPROM data structure 2008-02-19 17:01:34 +00:00
mn10300 MN10300: define HZ as a config option 2008-02-23 17:12:13 -08:00
parisc Introduce path_put() 2008-02-14 21:13:33 -08:00
powerpc Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2008-02-21 16:18:05 -08:00
ppc [POWERPC] PPC440EP Interrupt Triggering and Level Settings 2008-02-15 21:33:02 -06:00
s390 [S390] Fix futex_atomic_cmpxchg_std inline assembly. 2008-02-19 15:29:35 +01:00
sh arch/sh/drivers/dma/dma-sh.c: Correct use of ! and & 2008-02-27 10:28:48 +09:00
sparc [SPARC]: Fix build in arch/sparc/kernel/led.c 2008-02-24 18:45:09 -08:00
sparc64 [SPARC64]: Adjust kernel PC validation test in fault handler. 2008-02-28 20:38:15 -08:00
um sched: add declaration of sched_tail to sched.h 2008-02-25 16:34:17 +01:00
v850 ide: introduce HAVE_IDE 2008-02-09 10:46:40 +01:00
x86 KVM: MMU: Fix race when instantiating a shadow pte 2008-03-04 15:19:49 +02:00
xtensa [XTENSA] Allow debugger to modify the WINDOWBASE register. 2008-02-13 17:45:36 -08:00
.gitignore
Kconfig Move Kconfig.instrumentation to arch/Kconfig and init/Kconfig 2008-02-03 08:58:08 +01:00