kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] KVM: Fix order passed to iommu_unmap
@ 2010-05-26 19:29 Jan Kiszka
  2010-05-26 19:36 ` [PATCH v2] " Jan Kiszka
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2010-05-26 19:29 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: kvm, Joerg Roedel, Zachary Amsden

From: Jan Kiszka <jan.kiszka@siemens.com>

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.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 virt/kvm/iommu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/virt/kvm/iommu.c b/virt/kvm/iommu.c
index 5adc578..8b96251 100644
--- a/virt/kvm/iommu.c
+++ b/virt/kvm/iommu.c
@@ -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 */
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2] KVM: Fix order passed to iommu_unmap
  2010-05-26 19:29 [PATCH] KVM: Fix order passed to iommu_unmap Jan Kiszka
@ 2010-05-26 19:36 ` Jan Kiszka
  2010-05-27 10:08   ` Roedel, Joerg
  2010-05-27 12:40   ` Avi Kivity
  0 siblings, 2 replies; 4+ messages in thread
From: Jan Kiszka @ 2010-05-26 19:36 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: kvm, Joerg Roedel, Zachary Amsden

From: Jan Kiszka <jan.kiszka@siemens.com>

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.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

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

 virt/kvm/iommu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/virt/kvm/iommu.c b/virt/kvm/iommu.c
index 5adc578..673c88a 100644
--- a/virt/kvm/iommu.c
+++ b/virt/kvm/iommu.c
@@ -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 */

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] KVM: Fix order passed to iommu_unmap
  2010-05-26 19:36 ` [PATCH v2] " Jan Kiszka
@ 2010-05-27 10:08   ` Roedel, Joerg
  2010-05-27 12:40   ` Avi Kivity
  1 sibling, 0 replies; 4+ messages in thread
From: Roedel, Joerg @ 2010-05-27 10:08 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Avi Kivity, Marcelo Tosatti, kvm, Zachary Amsden

On Wed, May 26, 2010 at 03:36:33PM -0400, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> 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.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>

Uh, good catch.

Acked-by: Joerg Roedel <joerg.roedel@amd.com>

> ---
> 
> I think this one is even closer to the right order. :)
> 
>  virt/kvm/iommu.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/virt/kvm/iommu.c b/virt/kvm/iommu.c
> index 5adc578..673c88a 100644
> --- a/virt/kvm/iommu.c
> +++ b/virt/kvm/iommu.c
> @@ -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 */
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] KVM: Fix order passed to iommu_unmap
  2010-05-26 19:36 ` [PATCH v2] " Jan Kiszka
  2010-05-27 10:08   ` Roedel, Joerg
@ 2010-05-27 12:40   ` Avi Kivity
  1 sibling, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2010-05-27 12:40 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Marcelo Tosatti, kvm, Joerg Roedel, Zachary Amsden

On 05/26/2010 10:36 PM, Jan Kiszka wrote:
> From: Jan Kiszka<jan.kiszka@siemens.com>
>
> 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.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-27 12:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-26 19:29 [PATCH] KVM: Fix order passed to iommu_unmap Jan Kiszka
2010-05-26 19:36 ` [PATCH v2] " Jan Kiszka
2010-05-27 10:08   ` Roedel, Joerg
2010-05-27 12:40   ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).