From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Camachat Subject: Re: Can I specify a physical memory region for a domU Date: Fri, 9 Sep 2011 12:19:57 -0700 Message-ID: References: <20110908125920.GC28591@dumpdata.com> <20110908181205.GA19078@dumpdata.com> <20110908200038.GB21186@dumpdata.com> <20110909010550.GB9060@dumpdata.com> <20110909180601.GA5560@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20110909180601.GA5560@oracle.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: Konrad Rzeszutek Wilk Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Fri, Sep 9, 2011 at 11:06 AM, Konrad Rzeszutek Wilk wrote: > On Fri, Sep 09, 2011 at 09:48:03AM -0700, Eric Camachat wrote: >> On Fri, Sep 9, 2011 at 9:10 AM, Eric Camachat = wrote: >> > On Thu, Sep 8, 2011 at 6:05 PM, Konrad Rzeszutek Wilk >> > wrote: >> >> On Thu, Sep 08, 2011 at 05:15:06PM -0700, Eric Camachat wrote: >> >>> On Thu, Sep 8, 2011 at 1:00 PM, Konrad Rzeszutek Wilk >> >>> wrote: >> >>> >> > Make sure you set >> >>> >> > =C2=A0pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(31)); >> >>> >> > >> >>> >> > on top of pci_set_dma_mask(dev, DMA_BIT_MASK(31)); >> >>> >> > in your driver. >> >>> >> > >> >>> >> A lot of work to port the driver to PV domU, hope it works. >> >>> > >> >>> > Hm? That is the normal way you would write drivers in the Linux ke= rnel. >> >>> > You use the DMA API in it to deal with the PCI devices. >> >>> > >> >>> > Is the PV domU a Linux kernel or something else? >> >>> > >> >>> >> >>> Yes, the PV domU is linux kernel. >> >>> >> >>> I tested pci_alloc_consistent() verified on baremetal it worked with= 8GB SDRAM. >> >>> But while I ran it in XEN, pci_alloc_consistent() cannot allocate >> >>> memory successfully for 4MB although pci_set_dma_mask(), >> >> >> >> And what is the error? >> > >> > I cannot see any error, it just returned NULL. >> >> BTW, I will succeed if I allocate 2MB only. > > Ok, that is unsurprising. I don't know if you can do it any better on bar= emetal. > But I am failing to understand why you need such large swaths of contingo= us > memory. You can't do scatter gather? Or scatter gather on 2MB chunks? > I changed MAX_CONTIG_ORDER, and MAX_ORDER to 13 to fix this problem, finall= y.