From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v4 12/21] xen/passthrough: iommu: Split generic IOMMU code Date: Tue, 22 Apr 2014 15:58:08 +0100 Message-ID: <53568380.7060400@linaro.org> References: <1398172475-27873-1-git-send-email-julien.grall@linaro.org> <1398172475-27873-13-git-send-email-julien.grall@linaro.org> <53568F58020000780000ADBF@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wcc9E-0003QK-9t for xen-devel@lists.xenproject.org; Tue, 22 Apr 2014 14:58:12 +0000 Received: by mail-ee0-f48.google.com with SMTP id b57so4690412eek.7 for ; Tue, 22 Apr 2014 07:58:10 -0700 (PDT) In-Reply-To: <53568F58020000780000ADBF@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@lists.xenproject.org, stefano.stabellini@citrix.com, ian.campbell@citrix.com, Xiantao Zhang , tim@xen.org List-Id: xen-devel@lists.xenproject.org Hi Jan, On 04/22/2014 02:48 PM, Jan Beulich wrote: >>>> On 22.04.14 at 15:14, wrote: >> The generic IOMMU framework code (xen/drivers/passthrough/iommu.c) contains >> functions specific to x86 and PCI. >> >> Split the framework in 3 distincts files: >> - iommu.c: contains generic functions shared between x86 and ARM >> (when it will be supported) >> - pci.c: contains specific functions for PCI passthrough >> - x86/iommu.c: contains specific functions for x86 >> >> io.c contains x86 HVM specific code. Only compile for x86. >> >> This patch is mostly code movement in new files. >> >> Signed-off-by: Julien Grall > > Acked-by: Jan Beulich Thanks. To answer to your other mail, I didn't modify the behavior of the functions, only split them. > if one minor inconsistency gets addressed: >> +void __hwdom_init arch_iommu_check_hwdom_reqs(struct domain *d) >> +{ >> + if ( !iommu_enabled ) >> + panic("Presently, iommu must be enabled for pvh dom0\n"); >> +} > > Message text (containing PVH) and function name (not containing > PVH) don't fit together, nor does the conditional really establish a > connection. Do you prefer a comment, or an explicit check to is_pvh_domain(d)? Regards, -- Julien Grall