From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Roedel, Joerg" Subject: Re: [PATCH v2] KVM: Fix order passed to iommu_unmap Date: Thu, 27 May 2010 12:08:38 +0200 Message-ID: <20100527100838.GS3266@amd.com> References: <4BFD7686.2030109@web.de> <4BFD7841.9060302@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Avi Kivity , Marcelo Tosatti , kvm , Zachary Amsden To: Jan Kiszka Return-path: Received: from tx2ehsobe001.messaging.microsoft.com ([65.55.88.11]:14844 "EHLO TX2EHSOBE001.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751978Ab0E0KIt (ORCPT ); Thu, 27 May 2010 06:08:49 -0400 Content-Disposition: inline In-Reply-To: <4BFD7841.9060302@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, May 26, 2010 at 03:36:33PM -0400, Jan Kiszka wrote: > From: Jan Kiszka > > 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 Uh, good catch. Acked-by: Joerg Roedel > --- > > 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 */ >