diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2008-09-23 12:18:39 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-10-15 08:25:25 -0400 |
commit | 4731d4c7a07769cf2926c327177b97bb8c68cafc (patch) | |
tree | c732e9de4dbb35c74c158962771b6804dd8db153 /include/asm-x86 | |
parent | 6844dec6948679d084f054235fee19ba4e3a3096 (diff) |
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 <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/kvm_host.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h index 8b935cc4c14b..7d36fcc02818 100644 --- a/include/asm-x86/kvm_host.h +++ b/include/asm-x86/kvm_host.h | |||
@@ -195,6 +195,8 @@ struct kvm_mmu_page { | |||
195 | */ | 195 | */ |
196 | int multimapped; /* More than one parent_pte? */ | 196 | int multimapped; /* More than one parent_pte? */ |
197 | int root_count; /* Currently serving as active root */ | 197 | int root_count; /* Currently serving as active root */ |
198 | bool unsync; | ||
199 | bool unsync_children; | ||
198 | union { | 200 | union { |
199 | u64 *parent_pte; /* !multimapped */ | 201 | u64 *parent_pte; /* !multimapped */ |
200 | struct hlist_head parent_ptes; /* multimapped, kvm_pte_chain */ | 202 | struct hlist_head parent_ptes; /* multimapped, kvm_pte_chain */ |
@@ -371,6 +373,7 @@ struct kvm_vm_stat { | |||
371 | u32 mmu_flooded; | 373 | u32 mmu_flooded; |
372 | u32 mmu_recycled; | 374 | u32 mmu_recycled; |
373 | u32 mmu_cache_miss; | 375 | u32 mmu_cache_miss; |
376 | u32 mmu_unsync; | ||
374 | u32 remote_tlb_flush; | 377 | u32 remote_tlb_flush; |
375 | u32 lpages; | 378 | u32 lpages; |
376 | }; | 379 | }; |