From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH v4 12/21] xen/passthrough: iommu: Split generic IOMMU code Date: Tue, 22 Apr 2014 17:33:51 +0100 Message-ID: <5356B60F020000780000AFA9@nat28.tlf.novell.com> 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> <53568380.7060400@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wcddt-0006CU-33 for xen-devel@lists.xenproject.org; Tue, 22 Apr 2014 16:33:57 +0000 In-Reply-To: <53568380.7060400@linaro.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall 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 >>> On 22.04.14 at 16:58, wrote: >>> +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)? That depends on where it would go: If the caller checks for PVH, then the function name should change. If the caller doesn't, then I don't see how you'd avoid getting here for non-PVH. Jan