mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
KVM: MMU: out of sync shadow core
Allow guest pagetables to go out of sync. Instead of emulating write accesses to guest pagetables, or unshadowing them, we un-write-protect the page table and allow the guest to modify it at will. We rely on invlpg executions to synchronize individual ptes, and will synchronize the entire pagetable on tlb flushes. Signed-off-by: Marcelo Tosatti <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
This commit is contained in:
parent
6844dec694
commit
4731d4c7a0
5 changed files with 201 additions and 18 deletions
|
|
@ -195,6 +195,8 @@ struct kvm_mmu_page {
|
|||
*/
|
||||
int multimapped; /* More than one parent_pte? */
|
||||
int root_count; /* Currently serving as active root */
|
||||
bool unsync;
|
||||
bool unsync_children;
|
||||
union {
|
||||
u64 *parent_pte; /* !multimapped */
|
||||
struct hlist_head parent_ptes; /* multimapped, kvm_pte_chain */
|
||||
|
|
@ -371,6 +373,7 @@ struct kvm_vm_stat {
|
|||
u32 mmu_flooded;
|
||||
u32 mmu_recycled;
|
||||
u32 mmu_cache_miss;
|
||||
u32 mmu_unsync;
|
||||
u32 remote_tlb_flush;
|
||||
u32 lpages;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue