From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] KVM: Fix signature of kvm_iommu_map_pages stub Date: Mon, 18 Oct 2010 15:11:45 +0200 Message-ID: <4CBC4791.8020504@siemens.com> References: <4CB6F088.2060007@siemens.com> <4CB6FB07.10209@siemens.com> <20101018130400.GD29108@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , kvm , Joerg Roedel To: Marcelo Tosatti Return-path: Received: from david.siemens.de ([192.35.17.14]:24129 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754961Ab0JRNMG (ORCPT ); Mon, 18 Oct 2010 09:12:06 -0400 In-Reply-To: <20101018130400.GD29108@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: Am 18.10.2010 15:04, Marcelo Tosatti wrote: > On Thu, Oct 14, 2010 at 02:43:51PM +0200, Jan Kiszka wrote: >> Am 14.10.2010 13:59, Jan Kiszka wrote: >>> Breaks otherwise if CONFIG_IOMMU_API is not set. >> >> Actually, it only broke a special local version. It doesn't break with >> current KVM due to >> >> [__kvm_set_memory_region:] >> #ifdef CONFIG_DMAR >> /* map the pages in iommu page table */ >> if (npages) { >> r = kvm_iommu_map_pages(kvm, &new); >> if (r) >> goto out_free; >> } >> #endif >> >> And CONFIG_IOMMU_API is set when CONFIG_DMAR is enabled. But do we only >> need this call on Intel? > > On CONFIG_AMD_IOMMU too. It should be conditional on CONFIG_IOMMU_API. > Then we can simply drop the #ifdef here as kvm_iommu_map_pages is stubbed for !CONFIG_IOMMU_API. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux