linux_dsm_epyc7002/drivers/kvm
Avi Kivity ac1b714e78 KVM: MMU: Fix guest writes to nonpae pde
KVM shadow page tables are always in pae mode, regardless of the guest
setting.  This means that a guest pde (mapping 4MB of memory) is mapped
to two shadow pdes (mapping 2MB each).

When the guest writes to a pte or pde, we intercept the write and emulate it.
We also remove any shadowed mappings corresponding to the write.  Since the
mmu did not account for the doubling in the number of pdes, it removed the
wrong entry, resulting in a mismatch between shadow page tables and guest
page tables, followed shortly by guest memory corruption.

This patch fixes the problem by detecting the special case of writing to
a non-pae pde and adjusting the address and number of shadow pdes zapped
accordingly.

Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-18 10:49:09 +02:00
..
Kconfig [PATCH] KVM: Put KVM in a new Virtualization menu 2006-12-13 09:05:46 -08:00
kvm_main.c KVM: Unset kvm_arch_ops if arch module loading failed 2007-03-18 10:49:06 +02:00
kvm_svm.h KVM: Use ARRAY_SIZE macro instead of manual calculation. 2007-03-04 11:12:39 +02:00
kvm_vmx.h [PATCH] KVM: Replace __x86_64__ with CONFIG_X86_64 2006-12-13 09:05:46 -08:00
kvm.h KVM: Per-vcpu inodes 2007-03-04 11:12:42 +02:00
Makefile [PATCH] kvm: userspace interface 2006-12-10 09:57:22 -08:00
mmu.c KVM: MMU: Fix guest writes to nonpae pde 2007-03-18 10:49:09 +02:00
paging_tmpl.h KVM: Cosmetics 2007-03-04 11:12:39 +02:00
segment_descriptor.h [PATCH] kvm: userspace interface 2006-12-10 09:57:22 -08:00
svm.c KVM: Per-vcpu inodes 2007-03-04 11:12:42 +02:00
svm.h [PATCH] kvm: userspace interface 2006-12-10 09:57:22 -08:00
vmx.c KVM: Fix guest sysenter on vmx 2007-03-18 10:49:06 +02:00
vmx.h [PATCH] kvm: vmx: handle triple faults by returning EXIT_REASON_SHUTDOWN to userspace 2007-02-12 09:48:40 -08:00
x86_emulate.c [PATCH] KVM: x86 emulator: fix bit string instructions 2007-01-23 07:52:06 -08:00
x86_emulate.h [PATCH] KVM: Replace __x86_64__ with CONFIG_X86_64 2006-12-13 09:05:46 -08:00