diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2012-05-08 19:35:37 +0200 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-05-08 19:35:37 +0200 |
commit | 7b96c686223a5c902d6a59c7d178f3904f0ab757 (patch) | |
tree | fe328ed56ad3719de3cfebad72ef74e34f1ed92b /virt/kvm/kvm_main.c | |
parent | gpio: Move DT support code into drivers/gpio (diff) | |
parent | Linux 3.4-rc6 (diff) | |
download | linux-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.c | 5 |
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), |