1
0
Fork 0
alistair23-linux/arch/x86
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
..
boot Merge branch 'x86/mpparse' into x86/devel 2008-07-08 11:14:58 +02:00
configs x86: defconfig updates 2008-05-12 21:28:12 +02:00
crypto [CRYPTO] aes-x86-32: Remove unused return code 2008-04-21 10:19:21 +08:00
ia32 x86: rename threadinfo to TI. 2008-07-09 09:14:02 +02:00
kernel Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-07-17 10:38:59 -07:00
kvm KVM: MMU: Fix false flooding when a pte points to page table 2008-07-20 12:40:50 +03:00
lguest x86, VisWS: turn into generic arch, eliminate Kconfig specials 2008-07-10 18:55:47 +02:00
lib Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
mach-default x86, VisWS: turn into generic arch, eliminate Kconfig specials 2008-07-10 18:55:47 +02:00
mach-es7000 x86: make generic arch support NUMAQ 2008-06-10 11:34:42 +02:00
mach-generic x86: make generic arch support NUMAQ, fix 2008-07-08 10:35:45 +02:00
mach-rdc321x x86, rdc321x: remove watchdog file 2008-04-17 17:40:50 +02:00
mach-voyager Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
math-emu x86: coding style fixes to arch/x86/math-emu/reg_constant 2008-06-18 15:00:13 +02:00
mm Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-07-17 10:38:59 -07:00
oprofile Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
pci 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
power x86: remove end_pfn in 64bit 2008-07-08 13:10:38 +02:00
vdso Merge branch 'auto-ftrace-next' into tracing/for-linus 2008-07-14 16:11:52 +02:00
video x86: video/fbdev.c: add MODULE_LICENSE 2008-05-04 20:04:46 +02:00
xen Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
Kconfig Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
Kconfig.cpu x86: mark x86_64 as having a working WP. 2008-07-09 09:14:21 +02:00
Kconfig.debug x86: MMIOTRACE should not default to on 2008-07-14 15:03:25 -07:00
Makefile x86, VisWS: turn into generic arch, remove leftover files 2008-07-10 18:55:45 +02:00
Makefile_32.cpu x86: move i386 and x86_64 Makefiles to arch/x86 2007-10-25 22:27:34 +02:00