From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: dpdk kernel module when calling xen_create_contiguous_region Date: Thu, 1 May 2014 11:06:53 -0400 Message-ID: <20140501150653.GA18826@phenom.dumpdata.com> References: <5cd720275956472496663dc0e0e684a6@MUC-SRV-MBX2.advaoptical.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <5cd720275956472496663dc0e0e684a6@MUC-SRV-MBX2.advaoptical.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Samuel Monderer Cc: Shimon Zadok , Eyal Ben Saadon , Andrew Sergeev , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Thu, May 01, 2014 at 01:57:17PM +0000, Samuel Monderer wrote: > Hi, > > DPDK application requires hugepages to run. > XEN DOM0 does not support hugepages, to be able to run dpdk application in Dom0 a kernel module has been developed to facilitate the allocation and > mapping of memory. > > The current version of dpdk uses the old version of xen_create_contiguous_region which doesn't get the 4th parameter dma_handle. > I tried to update the call to xen_create_contiguous_region as following, but the module crashes when it calls xen_create_contiguous_region. You might consider also CC-ing the DPDK developers. > --- a/lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c > +++ b/lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c > @@ -64,6 +64,7 @@ > #include > #include > #include > > #include > #include > @@ -309,6 +310,7 @@ dom0_prepare_memsegs(struct memory_info* meminfo, struct dom0_ > uint64_t pfn, vstart, vaddr; > uint32_t i, num_block, size; > int idx; > + dma_addr_t dma_handle; > > /* Allocate 2M memory once */ > num_block = meminfo->size / 2; > @@ -344,7 +346,7 @@ dom0_prepare_memsegs(struct memory_info* meminfo, struct dom0_ > * contiguous physical addresses, its maximum size is 2M. > */ > if (xen_create_contiguous_region(mm_data->block_info[i].vir_addr, > - DOM0_CONTIG_NUM_ORDER, 0) == 0) { > + DOM0_CONTIG_NUM_ORDER, 0, &dma_handle) == 0) { > mm_data->block_info[i].exchange_flag = 1; > mm_data->block_info[i].mfn = > pfn_to_mfn(mm_data->block_info[i].pfn); > > Tried to find some documentation xen memory regions without success. > > Samuel > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel