From: "Jan Beulich" Subject: Re: [PATCH RFC] pvh: set need_iommu early Date: Thu, 22 Jan 2015 09:46:10 +0000 Message-ID: <54C0D4F20200007800057FBA@mail.emea.novell.com> References: <20150121205259.GA7068@elena.ufimtseva> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150121205259.GA7068@elena.ufimtseva> 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: Elena Ufimtseva Cc: kevin.tian@intel.com, tim@xen.org, xen-devel@lists.xen.org, yang.z.zhang@intel.com, boris.ostrovsky@oracle.com, roger.pau@citrix.com List-Id: xen-devel@lists.xenproject.org >>> On 21.01.15 at 21:53, wrote: Apart from the issues with this submission that Kevin already mentioned, please ... > --- a/xen/arch/x86/domain_build.c > +++ b/xen/arch/x86/domain_build.c > @@ -1500,7 +1500,9 @@ int __init construct_dom0( > > if ( is_pvh_domain(d) ) > { > - /* finally, fixup the page table, replacing mfns with pfns */ > + d->need_iommu = 1; > + > + /* finally, fixup the page table, replacing mfns with pfns */ ... don't use hard tabs and ... > --- a/xen/drivers/passthrough/iommu.c > +++ b/xen/drivers/passthrough/iommu.c > @@ -154,7 +154,7 @@ void __hwdom_init iommu_hwdom_init(struct domain *d) > return; > > register_keyhandler('o', &iommu_p2m_table); > - d->need_iommu = !!iommu_dom0_strict; > + d->need_iommu |= !!iommu_dom0_strict; ... explain what this is needed for (considering that iommu_dom0_strict gets forced to 1 for PVH). Jan