From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id E6D933208 for ; Thu, 26 Feb 2015 07:53:41 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 25 Feb 2015 22:53:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,651,1418112000"; d="scan'208";a="657402807" Received: from kmsmsx151.gar.corp.intel.com ([172.21.73.86]) by orsmga001.jf.intel.com with ESMTP; 25 Feb 2015 22:53:28 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by KMSMSX151.gar.corp.intel.com (172.21.73.86) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 26 Feb 2015 14:53:26 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.192]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.197]) with mapi id 14.03.0195.001; Thu, 26 Feb 2015 14:53:25 +0800 From: "Liu, Jijiang" To: Stephen Hemminger Thread-Topic: [dpdk-dev] [PATCH 1/4] xen: allow choosing dom0 support at runtime Thread-Index: AdBI04tcJbZDeS+eTKiYvBJ1V+grSQAFPgqAAikqOqA= Date: Thu, 26 Feb 2015 06:53:24 +0000 Message-ID: <1ED644BD7E0A5F4091CF203DAFB8E4CC01DDF030@SHSMSX101.ccr.corp.intel.com> References: <1ED644BD7E0A5F4091CF203DAFB8E4CC01DDC7CB@SHSMSX101.ccr.corp.intel.com> <20150215092747.2f6a4822@uryu.home.lan> In-Reply-To: <20150215092747.2f6a4822@uryu.home.lan> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" , Stephen Hemminger Subject: Re: [dpdk-dev] [PATCH 1/4] xen: allow choosing dom0 support at runtime X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Feb 2015 06:53:43 -0000 > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Sunday, February 15, 2015 10:28 PM > To: Liu, Jijiang > Cc: Stephen Hemminger; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 1/4] xen: allow choosing dom0 support at > runtime >=20 > On Sun, 15 Feb 2015 04:07:21 +0000 > "Liu, Jijiang" wrote: >=20 > > Hi Stephen, > > > > What do you mean ' allow choosing dom0 support at runtime'? > > If you mean user can choose DPDK to run Xen Dom0 or not on DOM0 by a > runtime flag, I don't think your change can achieve this goal. > > > > Thanks > > Jijiang Liu >=20 > With the existing DPDK model if application is built with DOM0 support it= will > not work (it crashes) if the application is run in a non DOM0 environment= (with > real huge pages). And vice-versa if application is built without DOM0 sup= port > and it will crash if run in Xen Paravirt mode. >=20 > This patch allows the library to be built in such a way that only one ver= sion > needs to be shipped which is important for distro's like RHEL who want to= ship a > shared library. And also important for users like Brocade/Vyatta who buil= d one > binary that needs to work on bare Linux and in Xen PV mode. >=20 Ok, thanks for the explanation. Could you replace 'internal_config.xen_dom0_support' with 'is_xen_dom0_su= pported()' in the function rte_eal_hugepage_init()? /* check if app runs on Xen Dom0 */ if (internal_config.xen_dom0_support) { #ifdef RTE_LIBRTE_XEN_DOM0 /* use dom0_mm kernel driver to init memory */ if (rte_xen_dom0_memory_init() < 0) return -1; else return 0; #endif