Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329834
b: refs/heads/master
c: 16b854c
h: refs/heads/master
v: v3
  • Loading branch information
Xiao Guangrong authored and Avi Kivity committed Aug 6, 2012
1 parent 8b5cf9f commit 570a780
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d89cc617b954aff4030fce178f7d86f59aaf713d
refs/heads/master: 16b854c889673d988285719bc020543a730f9ac6
7 changes: 7 additions & 0 deletions trunk/virt/kvm/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot)
*/
pfn = kvm_pin_pages(slot, gfn, page_size);
if (is_error_pfn(pfn)) {
kvm_release_pfn_clean(pfn);
gfn += 1;
continue;
}
Expand Down Expand Up @@ -300,6 +301,12 @@ static void kvm_iommu_put_pages(struct kvm *kvm,

/* Get physical address */
phys = iommu_iova_to_phys(domain, gfn_to_gpa(gfn));

if (!phys) {
gfn++;
continue;
}

pfn = phys >> PAGE_SHIFT;

/* Unmap address from IO address space */
Expand Down

0 comments on commit 570a780

Please sign in to comment.