1
0
Fork 0
alistair23-linux/arch/x86/kvm
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
..
Kconfig KVM: Add kvm trace userspace interface 2008-04-27 12:01:22 +03:00
Makefile KVM: Add kvm trace userspace interface 2008-04-27 12:01:22 +03:00
i8254.c KVM: PIT: support mode 3 2008-07-20 12:40:49 +03:00
i8254.h KVM: Add reset support for in kernel PIT 2008-04-27 12:00:23 +03:00
i8259.c KVM: Move arch dependent files to new directory arch/x86/kvm/ 2008-01-30 18:01:18 +02:00
irq.c KVM: migrate PIT timer 2008-06-06 21:25:51 +03:00
irq.h KVM: migrate PIT timer 2008-06-06 21:25:51 +03:00
kvm_svm.h KVM: SVM: allocate the MSR permission map per VCPU 2008-04-27 11:53:21 +03:00
lapic.c KVM: VMX: move APIC_ACCESS trace entry to generic code 2008-07-20 12:40:47 +03:00
lapic.h KVM: add statics were possible, function definition in lapic.h 2008-07-20 12:40:46 +03:00
mmu.c KVM: MMU: Fix false flooding when a pte points to page table 2008-07-20 12:40:50 +03:00
mmu.h KVM: MMU: Fix false flooding when a pte points to page table 2008-07-20 12:40:50 +03:00
paging_tmpl.h KVM: MMU: Fix printk() format string 2008-06-06 21:36:20 +03:00
svm.c KVM: SVM: Fake MSR_K7 performance counters 2008-07-20 12:40:49 +03:00
svm.h KVM: x86: hardware task switching support 2008-04-27 12:00:39 +03:00
tss.h KVM: x86: hardware task switching support 2008-04-27 12:00:39 +03:00
vmx.c KVM: VMX: Trivial vmcs_write64() code simplification 2008-07-20 12:40:50 +03:00
vmx.h KVM: VMX: Enable EPT feature for KVM 2008-05-04 14:44:42 +03:00
x86.c KVM: add missing kvmtrace bits 2008-07-20 12:40:48 +03:00
x86_emulate.c KVM: x86 emulator: fix hypercall return value on AMD 2008-06-06 21:08:25 +03:00