kernel-ark/arch
Avi Kivity 1b7fcd3263 KVM: MMU: Fix false flooding when a pte points to page table
The KVM MMU tries to detect when a speculative pte update is not actually
used by demand fault, by checking the accessed bit of the shadow pte.  If
the shadow pte has not been accessed, we deem that page table flooded and
remove the shadow page table, allowing further pte updates to proceed
without emulation.

However, if the pte itself points at a page table and only used for write
operations, the accessed bit will never be set since all access will happen
through the emulator.

This is exactly what happens with kscand on old (2.4.x) HIGHMEM kernels.
The kernel points a kmap_atomic() pte at a page table, and then
proceeds with read-modify-write operations to look at the dirty and accessed
bits.  We get a false flood trigger on the kmap ptes, which results in the
mmu spending all its time setting up and tearing down shadows.

Fix by setting the shadow accessed bit on emulated accesses.

Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-07-20 12:40:50 +03:00
..
alpha Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
arm Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
avr32 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc 2008-07-16 15:17:52 -07:00
blackfin Merge commit 'v2.6.26' into bkl-removal 2008-07-14 15:29:34 -06:00
cris Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
frv
h8300
ia64 fix build error of arch/ia64/kvm/* 2008-07-17 09:16:31 -07:00
m32r
m68k Merge commit 'v2.6.26' into bkl-removal 2008-07-14 15:29:34 -06:00
m68knommu Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
mips Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
mn10300
parisc Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
powerpc powerpc/ep8248e: Fix compile problem if !CONFIG_FS_ENET 2008-07-16 11:43:48 -07:00
s390 [S390] Fix stacktrace compile bug. 2008-07-17 17:22:09 +02:00
sh Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
sparc Merge commit 'v2.6.26' into bkl-removal 2008-07-14 15:29:34 -06:00
sparc64 Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
um Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
v850
x86 KVM: MMU: Fix false flooding when a pte points to page table 2008-07-20 12:40:50 +03:00
xtensa
.gitignore
Kconfig