From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH v3 09/32] libxl: switch HVM domain building to use xc_dom_* helpers Date: Tue, 28 Jul 2015 15:29:01 +0100 Message-ID: <20150728142901.GQ5111@zion.uk.xensource.com> References: <1435923310-9019-1-git-send-email-roger.pau@citrix.com> <1435923310-9019-10-git-send-email-roger.pau@citrix.com> <20150728112239.GL5111@zion.uk.xensource.com> <55B79107.3030402@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZK5sW-0002Vp-Km for xen-devel@lists.xenproject.org; Tue, 28 Jul 2015 14:29:12 +0000 Content-Disposition: inline In-Reply-To: <55B79107.3030402@citrix.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: Roger Pau =?iso-8859-1?Q?Monn=E9?= Cc: xen-devel@lists.xenproject.org, Ian Campbell , Wei Liu , Ian Jackson , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Tue, Jul 28, 2015 at 04:26:15PM +0200, Roger Pau Monn=E9 wrote: > El 28/07/15 a les 13.22, Wei Liu ha escrit: > > On Fri, Jul 03, 2015 at 01:34:47PM +0200, Roger Pau Monne wrote: > >> Now that we have all the code in place HVM domain building in libxl ca= n be > >> switched to use the xc_dom_* family of functions, just like they are u= sed in > >> order to build PV guests. > >> > >> Signed-off-by: Roger Pau Monn=E9 > >> Cc: Ian Jackson > >> Cc: Stefano Stabellini > >> Cc: Ian Campbell > >> Cc: Wei Liu > > = > > Mostly looks good. Some nits below. > = > Thanks for the review. > = > >> --- > >> tools/libxl/libxl_dom.c | 224 +++++++++++++++++++++++++---------= --------- > >> tools/libxl/libxl_internal.h | 2 +- > >> tools/libxl/libxl_vnuma.c | 12 ++- > >> 3 files changed, 139 insertions(+), 99 deletions(-) > >> > >> diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c > >> index 2bae277..480b7e7 100644 > >> --- a/tools/libxl/libxl_dom.c > >> +++ b/tools/libxl/libxl_dom.c > >> @@ -609,6 +609,64 @@ static int set_vnuma_info(libxl__gc *gc, uint32_t= domid, > >> return rc; > >> } > >> = > >> +static int libxl__build_dom(libxl__gc *gc, uint32_t domid, > >> + libxl_domain_build_info *info, libxl__domain_build_state= *state, > >> + struct xc_dom_image *dom) > >> +{ > >> + libxl_ctx *ctx =3D libxl__gc_owner(gc); > > = > > No need to have this line. > = > But ctx is needed... > = > >> + uint64_t mem_kb; > >> + int ret; > >> + > >> + if ( (ret =3D xc_dom_boot_xen_init(dom, ctx->xch, domid)) !=3D 0 = ) { > ^ here. Use CTX macro here. Sorry I missed this. Wei.