Skip to contentSkip to conversation

KVM: Fix order passed to iommu_unmap

PATCH Superseded Jan Kiszka 3 participants 4 messages May 26, 2010 – May 27, 2010 KVM

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 KVM: Fix order passed to iommu_unmap

From: Jan Kiszka <[email protected]>

This is obviously a left-over from the the old interface taking the size. Apparently a mostly harmless issue with the current iommu_unmap implementation.

---
 virt/kvm/iommu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
virt/kvm/iommu.c +1 -1
index 5adc578..8b96251 100644
@@ -273,7 +273,7 @@ static void kvm_iommu_put_pages(struct kvm *kvm,
 		pfn  = phys >> PAGE_SHIFT;
 
 		/* Unmap address from IO address space */
-		order       = iommu_unmap(domain, gfn_to_gpa(gfn), PAGE_SIZE);
+		order       = iommu_unmap(domain, gfn_to_gpa(gfn), 1);
 		unmap_pages = 1ULL << order;
 
 		/* Unpin all pages we just unmapped to not leak any memory */
Signature · 1 line
1.6.0.2
author
#1 lore raw

PATCH v2 1/1 KVM: Fix order passed to iommu_unmap

From: Jan Kiszka <[email protected]>

This is obviously a left-over from the the old interface taking the size. Apparently a mostly harmless issue with the current iommu_unmap implementation.

---

I think this one is even closer to the right order. :)

 virt/kvm/iommu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
virt/kvm/iommu.c +1 -1
index 5adc578..673c88a 100644
@@ -273,7 +273,7 @@ static void kvm_iommu_put_pages(struct kvm *kvm,
 		pfn  = phys >> PAGE_SHIFT;
 
 		/* Unmap address from IO address space */
-		order       = iommu_unmap(domain, gfn_to_gpa(gfn), PAGE_SIZE);
+		order       = iommu_unmap(domain, gfn_to_gpa(gfn), 0);
 		unmap_pages = 1ULL << order;
 
 		/* Unpin all pages we just unmapped to not leak any memory */
Acked-by on v2 1/1
#2 lore raw
Quoted 7 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

This is obviously a left-over from the the old interface taking the size. Apparently a mostly harmless issue with the current iommu_unmap implementation.

Uh, good catch.

Quoted 21 lines

---

I think this one is even closer to the right order. :)

 virt/kvm/iommu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
virt/kvm/iommu.c +1 -1
index 5adc578..673c88a 100644
@@ -273,7 +273,7 @@ static void kvm_iommu_put_pages(struct kvm *kvm,
 		pfn  = phys >> PAGE_SHIFT;
 
 		/* Unmap address from IO address space */
-		order       = iommu_unmap(domain, gfn_to_gpa(gfn), PAGE_SIZE);
+		order       = iommu_unmap(domain, gfn_to_gpa(gfn), 0);
 		unmap_pages = 1ULL << order;
 
 		/* Unpin all pages we just unmapped to not leak any memory */
Applied
#3 lore raw
In reply to Jan Kiszka
Quoted 6 lines · Jan Kiszka

From: Jan Kiszka<[email protected]>

This is obviously a left-over from the the old interface taking the size. Apparently a mostly harmless issue with the current iommu_unmap implementation.

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function