Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329901
b: refs/heads/master
c: 3b4dc3a
h: refs/heads/master
i:
  329899: c40ec2e
v: v3
  • Loading branch information
Marcelo Tosatti authored and Avi Kivity committed Sep 6, 2012
1 parent fb8ec32 commit ffcfb53
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 12d6e7538e2d418c08f082b1b44ffa5fb7270ed8
refs/heads/master: 3b4dc3a031110753b9ba36432dbd21f989fcee56
8 changes: 8 additions & 0 deletions trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -6445,6 +6445,14 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
kvm_mmu_change_mmu_pages(kvm, nr_mmu_pages);
kvm_mmu_slot_remove_write_access(kvm, mem->slot);
spin_unlock(&kvm->mmu_lock);
/*
* If memory slot is created, or moved, we need to clear all
* mmio sptes.
*/
if (npages && old.base_gfn != mem->guest_phys_addr >> PAGE_SHIFT) {
kvm_mmu_zap_all(kvm);
kvm_reload_remote_mmus(kvm);
}
}

void kvm_arch_flush_shadow_all(struct kvm *kvm)
Expand Down
7 changes: 0 additions & 7 deletions trunk/virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -849,13 +849,6 @@ int __kvm_set_memory_region(struct kvm *kvm,

kvm_arch_commit_memory_region(kvm, mem, old, user_alloc);

/*
* If the new memory slot is created, we need to clear all
* mmio sptes.
*/
if (npages && old.base_gfn != mem->guest_phys_addr >> PAGE_SHIFT)
kvm_arch_flush_shadow_all(kvm);

kvm_free_physmem_slot(&old, &new);
kfree(old_memslots);

Expand Down

0 comments on commit ffcfb53

Please sign in to comment.