summaryrefslogtreecommitdiffstats
path: root/virt/kvm/kvm_main.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-05-08 19:35:37 +0200
committerGrant Likely <grant.likely@secretlab.ca>2012-05-08 19:35:37 +0200
commit7b96c686223a5c902d6a59c7d178f3904f0ab757 (patch)
treefe328ed56ad3719de3cfebad72ef74e34f1ed92b /virt/kvm/kvm_main.c
parentgpio: Move DT support code into drivers/gpio (diff)
parentLinux 3.4-rc6 (diff)
downloadlinux-7b96c686223a5c902d6a59c7d178f3904f0ab757.tar.xz
linux-7b96c686223a5c902d6a59c7d178f3904f0ab757.zip
Merge tag 'v3.4-rc6' into gpio/next
Linux 3.4-rc6
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r--virt/kvm/kvm_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 42b73930a6de..9739b533ca2e 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -808,12 +808,13 @@ int __kvm_set_memory_region(struct kvm *kvm,
if (r)
goto out_free;
- /* map the pages in iommu page table */
+ /* map/unmap the pages in iommu page table */
if (npages) {
r = kvm_iommu_map_pages(kvm, &new);
if (r)
goto out_free;
- }
+ } else
+ kvm_iommu_unmap_pages(kvm, &old);
r = -ENOMEM;
slots = kmemdup(kvm->memslots, sizeof(struct kvm_memslots),