summaryrefslogtreecommitdiffstats
path: root/virt/kvm/kvm_main.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-12-27 12:08:45 +0200
committerMarcelo Tosatti <mtosatti@redhat.com>2011-03-17 13:08:24 -0300
commit8234b22e1c3287307c53655b16478cf8f5071555 (patch)
tree7dd7ae5f746efe4af845acba9a1cc26b8e4b9637 /virt/kvm/kvm_main.c
parent054cfaacf88865bff1dd58d305443d5d6c068a08 (diff)
downloadop-kernel-dev-8234b22e1c3287307c53655b16478cf8f5071555.zip
op-kernel-dev-8234b22e1c3287307c53655b16478cf8f5071555.tar.gz
KVM: MMU: Don't flush shadow when enabling dirty tracking
Instead, drop large mappings, which were the reason we dropped shadow. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r--virt/kvm/kvm_main.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index f29abeb..a3a8f5f 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -621,7 +621,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
struct kvm_userspace_memory_region *mem,
int user_alloc)
{
- int r, flush_shadow = 0;
+ int r;
gfn_t base_gfn;
unsigned long npages;
unsigned long i;
@@ -741,8 +741,6 @@ skip_lpage:
if (kvm_create_dirty_bitmap(&new) < 0)
goto out_free;
/* destroy any largepage mappings for dirty tracking */
- if (old.npages)
- flush_shadow = 1;
}
#else /* not defined CONFIG_S390 */
new.user_alloc = user_alloc;
@@ -813,9 +811,6 @@ skip_lpage:
kvm_free_physmem_slot(&old, &new);
kfree(old_memslots);
- if (flush_shadow)
- kvm_arch_flush_shadow(kvm);
-
return 0;
out_free:
OpenPOWER on IntegriCloud