From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: I cannot get any message from domU by console / pv_ops domU kernel crashes with xen_create_contiguous_region failed Date: Tue, 22 Dec 2009 13:08:20 -0500 Message-ID: <20091222180820.GA31242@phenom.dumpdata.com> References: <20091222084214.GR16033@reaktio.net> <1261473615.5965.3829.camel@zakaz.uk.xensource.com> <20091222143540.GB2785@phenom.dumpdata.com> <1261493401.5965.5944.camel@zakaz.uk.xensource.com> <20091222154747.GC5181@phenom.dumpdata.com> <1261498176.5965.6477.camel@zakaz.uk.xensource.com> <20091222161919.GA6426@phenom.dumpdata.com> <20091222165905.GA13650@phenom.dumpdata.com> <1261504973.5965.7226.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1261504973.5965.7226.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: Jeremy Fitzhardinge , "xen-devel@lists.xensource.com" , ?????? List-Id: xen-devel@lists.xenproject.org > > void __init xen_swiotlb_init(void) > > { > > - if (xen_domain()) { > > + int use_swiotlb = 0; > > + > > + if (xen_initial_domain()) > > + use_swiotlb = 1; > > + > > + /* For PV guest, only if iommu=soft is passed in. */ > > + if (xen_pv_domain() && !xen_initial_domain() && swiotlb) > > + use_swiotlb = 1; > > + > > + if (use_swiotlb) { > > How about just > if (xen_pv_domain() && (xen_initial_domain() || swiotlb)) That would work too. Let me remake the patch as it also has spaces instead of tabs and fails the checkpatch.pl. > Or depending on how/where swiotlb gets set (i.e. if it is set IFF > xen_pv_domain) simply: > if (xen_initial_domain() || swiotlb) Can't do that, as it could on baremetal allocate the Xen-SWIOTLB. > > Ian. >