From: "Jan Beulich" Subject: Re: [V2 PATCH 1/8] PVH dom0: iommu related changes Date: Mon, 25 Nov 2013 08:35:02 +0000 Message-ID: <529319C602000078001065CF@nat28.tlf.novell.com> References: <1385165018-25933-1-git-send-email-mukesh.rathor@oracle.com> <1385165018-25933-2-git-send-email-mukesh.rathor@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1385165018-25933-2-git-send-email-mukesh.rathor@oracle.com> 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: Xen-devel@lists.xensource.com, Mukesh Rathor Cc: keir.xen@gmail.com, tim@xen.org List-Id: xen-devel@lists.xenproject.org >>> On 23.11.13 at 01:03, Mukesh Rathor wrote: > --- a/xen/drivers/passthrough/iommu.c > +++ b/xen/drivers/passthrough/iommu.c > @@ -125,15 +125,27 @@ int iommu_domain_init(struct domain *d) > return hd->platform_ops->init(d); > } > > +static __init void check_dom0_pvh_reqs(struct domain *d) > +{ > + if ( !iommu_enabled ) > + panic("Presently, iommu must be enabled for pvh dom0\n"); > + > + if ( iommu_passthrough ) > + panic("For pvh dom0, dom0-passthrough must not be enabled\n"); > +} > + > void __init iommu_dom0_init(struct domain *d) > { > struct hvm_iommu *hd = domain_hvm_iommu(d); > > + if ( is_pvh_domain(d) ) > + check_dom0_pvh_reqs(d); > + > if ( !iommu_enabled ) > return; > > register_keyhandler('o', &iommu_p2m_table); > - d->need_iommu = !!iommu_dom0_strict; > + d->need_iommu = is_pvh_domain(d) || !!iommu_dom0_strict; I'd prefer if you simply forced iommu_dom0_strict on in check_dom0_pvh_reqs(). Jan