diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2008-09-23 12:18:29 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-10-15 08:25:15 -0400 |
commit | 93a423e7045cf3cf69f960ff307edda1afcd7b41 (patch) | |
tree | 05271993d2e6be3668c4b865559d7ded709a52f0 /arch/x86 | |
parent | a08546001c2b0f584ffc81987340943a7d6d6acb (diff) |
KVM: MMU: flush remote TLBs on large->normal entry overwrite
It is necessary to flush all TLB's when a large spte entry is
overwritten with a normal page directory pointer.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/paging_tmpl.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 6dd08e096e24..e9fbaa44d444 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h | |||
@@ -310,8 +310,11 @@ static int FNAME(shadow_walk_entry)(struct kvm_shadow_walk *_sw, | |||
310 | if (is_shadow_present_pte(*sptep) && !is_large_pte(*sptep)) | 310 | if (is_shadow_present_pte(*sptep) && !is_large_pte(*sptep)) |
311 | return 0; | 311 | return 0; |
312 | 312 | ||
313 | if (is_large_pte(*sptep)) | 313 | if (is_large_pte(*sptep)) { |
314 | set_shadow_pte(sptep, shadow_trap_nonpresent_pte); | ||
315 | kvm_flush_remote_tlbs(vcpu->kvm); | ||
314 | rmap_remove(vcpu->kvm, sptep); | 316 | rmap_remove(vcpu->kvm, sptep); |
317 | } | ||
315 | 318 | ||
316 | if (level == PT_DIRECTORY_LEVEL && gw->level == PT_DIRECTORY_LEVEL) { | 319 | if (level == PT_DIRECTORY_LEVEL && gw->level == PT_DIRECTORY_LEVEL) { |
317 | metaphysical = 1; | 320 | metaphysical = 1; |