From patchwork Wed May 26 19:29:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 102474 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4QJUf8m000674 for ; Wed, 26 May 2010 19:30:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755415Ab0EZTai (ORCPT ); Wed, 26 May 2010 15:30:38 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:35702 "EHLO fmmailgate03.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754281Ab0EZTai (ORCPT ); Wed, 26 May 2010 15:30:38 -0400 Received: from smtp02.web.de ( [172.20.0.184]) by fmmailgate03.web.de (Postfix) with ESMTP id AADEA152AFED3; Wed, 26 May 2010 21:29:10 +0200 (CEST) Received: from [88.65.252.165] (helo=[192.168.1.10]) by smtp02.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #4) id 1OHMHu-00020Z-00; Wed, 26 May 2010 21:29:10 +0200 Message-ID: <4BFD7686.2030109@web.de> Date: Wed, 26 May 2010 21:29:10 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Avi Kivity , Marcelo Tosatti CC: kvm , Joerg Roedel , Zachary Amsden Subject: [PATCH] KVM: Fix order passed to iommu_unmap X-Enigmail-Version: 0.95.7 X-Sender: jan.kiszka@web.de X-Provags-ID: V01U2FsdGVkX1+EjdHw7N/y4aDZv4WBDO4FDkmvkk2z80ZfeN9M EgCHskkKhxGkCNryZazuB5tSPNL/f9SQAqhh2juHrr7Opv7agE CWR5xHXng= Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 26 May 2010 19:30:41 +0000 (UTC) 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 */