diff options
Diffstat (limited to 'virt/kvm')
-rw-r--r-- | virt/kvm/kvm_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 9ccaf8f5402e..30b36368fcdf 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -405,6 +405,9 @@ int __kvm_set_memory_region(struct kvm *kvm, | |||
405 | if (mem->slot >= kvm->nmemslots) | 405 | if (mem->slot >= kvm->nmemslots) |
406 | kvm->nmemslots = mem->slot + 1; | 406 | kvm->nmemslots = mem->slot + 1; |
407 | 407 | ||
408 | if (!npages) | ||
409 | kvm_arch_flush_shadow(kvm); | ||
410 | |||
408 | *memslot = new; | 411 | *memslot = new; |
409 | 412 | ||
410 | r = kvm_arch_set_memory_region(kvm, mem, old, user_alloc); | 413 | r = kvm_arch_set_memory_region(kvm, mem, old, user_alloc); |