android_kernel_xiaomi_sm8350/drivers/kvm
Avi Kivity fce0657ff9 KVM: MMU: Respect nonpae pagetable quadrant when zapping ptes
When a guest writes to a page that has an mmu shadow, we have to clear
the shadow pte corresponding to the memory location touched by the guest.

Now, in nonpae mode, a single guest page may have two or four shadow
pages (because a nonpae page maps 4MB or 4GB, whereas the pae shadow maps
2MB or 1GB), so we when we look up the page we find up to three additional
aliases for the page.  Since we _clear_ the shadow pte, it doesn't matter
except for a slight performance penalty, but if we want to _update_ the
shadow pte instead of clearing it, it is vital that we don't modify the
aliases.

Fortunately, exactly which page is needed (the "quadrant") is easily
computed, and is accessible in the shadow page header.  All we need is
to ignore shadow pages from the wrong quadrants.

Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-07-16 12:05:39 +03:00
..
Kconfig [S390] Kconfig: refine depends statements. 2007-05-10 15:46:07 +02:00
kvm_main.c KVM: Unify kvm_mmu_pre_write() and kvm_mmu_post_write() 2007-07-16 12:05:38 +03:00
kvm_svm.h KVM: SVM: Only save/restore MSRs when needed 2007-05-03 10:52:32 +03:00
kvm.h KVM: Unify kvm_mmu_pre_write() and kvm_mmu_post_write() 2007-07-16 12:05:38 +03:00
Makefile
mmu.c KVM: MMU: Respect nonpae pagetable quadrant when zapping ptes 2007-07-16 12:05:39 +03:00
paging_tmpl.h KVM: Reduce misfirings of the fork detector 2007-07-16 12:05:38 +03:00
segment_descriptor.h
svm.c KVM: SVM: Allow direct guest access to PC debug port 2007-07-16 12:05:37 +03:00
svm.h KVM: SVM: forbid guest to execute monitor/mwait 2007-05-03 10:52:26 +03:00
vmx.c KVM: Be more careful restoring fs on lightweight vmexit 2007-07-16 12:05:38 +03: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 KVM: Allow passing 64-bit values to the emulated read/write API 2007-05-03 10:52:31 +03:00
x86_emulate.h KVM: Allow passing 64-bit values to the emulated read/write API 2007-05-03 10:52:31 +03:00