From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v3 06/13] xen/passthrough: iommu: Split generic IOMMU code Date: Tue, 11 Mar 2014 17:09:19 +0000 Message-ID: <531F433F.8000009@linaro.org> References: <1394552999-14171-1-git-send-email-julien.grall@linaro.org> <1394552999-14171-7-git-send-email-julien.grall@linaro.org> <531F4CCC0200007800122F5F@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WNQBB-0000gb-Ex for xen-devel@lists.xenproject.org; Tue, 11 Mar 2014 17:09:25 +0000 Received: by mail-we0-f179.google.com with SMTP id x48so10097663wes.24 for ; Tue, 11 Mar 2014 10:09:23 -0700 (PDT) In-Reply-To: <531F4CCC0200007800122F5F@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel , stefano.stabellini@citrix.com, ian.campbell@citrix.com, Xiantao Zhang , tim@xen.org List-Id: xen-devel@lists.xenproject.org Hello Jan, On 03/11/2014 04:50 PM, Jan Beulich wrote: >>>> On 11.03.14 at 16:49, Julien Grall wrote: >> --- a/xen/drivers/passthrough/pci.c >> +++ b/xen/drivers/passthrough/pci.c >> ... >> +static int iommu_populate_page_table(struct domain *d) >> +{ > > I continue to be of the opinion that this is misplaced here. There's > nothing PCI-related in this function, and I doubt you can get away > on ARM without similar code (if you can, this should go into > .../x86/iommu.c imo). On ARM, the page table is shared with the processor, we don't need to populate the page table. Furthermore, this function is using "arch.relmem_list", which is not implemented on ARM. I can move it in x86/iommu.c and implemented the function is no-op on ARM. > >> --- /dev/null >> +++ b/xen/include/asm-x86/iommu.h >> ... >> +void iommu_set_dom0_mapping(struct domain *d); > > How is this x86-specific? iommu_set_dom0_mapping is implemented in vtd/x86/vtd.c and only used by vtd/iommu.c. I think this function should be renamed to iommu_vtd_set_dom0_mapping. Regards, -- Julien Grall