From: Wei Liu Subject: Re: [PATCH v5 07/28] libxc: rework BSP initialization Date: Tue, 25 Aug 2015 10:32:10 +0100 Message-ID: <20150825093210.GJ29776@zion.uk.xensource.com> References: <1440176021-18910-1-git-send-email-roger.pau@citrix.com> <1440176021-18910-8-git-send-email-roger.pau@citrix.com> <20150825090257.GG29776@zion.uk.xensource.com> <55DC33C8.1030304@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZUAat-0002hp-D6 for xen-devel@lists.xenproject.org; Tue, 25 Aug 2015 09:32:39 +0000 Content-Disposition: inline In-Reply-To: <55DC33C8.1030304@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, Aug 25, 2015 at 11:22:16AM +0200, Roger Pau Monn=E9 wrote: > El 25/08/15 a les 11.02, Wei Liu ha escrit: > > On Fri, Aug 21, 2015 at 06:53:20PM +0200, Roger Pau Monne wrote: > > [...] > >> static int clear_page(struct xc_dom_image *dom, xen_pfn_t pfn) > >> { > >> xen_pfn_t dst; > >> @@ -197,14 +184,9 @@ void *xc_dom_boot_domU_map(struct xc_dom_image *d= om, xen_pfn_t pfn, > >> = > >> int xc_dom_boot_image(struct xc_dom_image *dom) > >> { > >> - DECLARE_HYPERCALL_BUFFER(vcpu_guest_context_any_t, ctxt); > >> xc_dominfo_t info; > >> int rc; > >> = > >> - ctxt =3D xc_hypercall_buffer_alloc(dom->xch, ctxt, sizeof(*ctxt)); > >> - if ( ctxt =3D=3D NULL ) > >> - return -1; > >> - > > = > > As I said in my last round review, I think you would need to use the > > same snippet to allocate hypercall safe buffer in various vcpu_* > > functions. > > = > > Is there any reason that you don't do it in this version? > = > I've already replied to your comment in the previous version and I > thought you agreed on the explanation (since there was no further reply): > = > http://marc.info/?l=3Dxen-devel&m=3D143894912832281 > = Oh, right. Sorry I missed your reply to that question. You're right, xc_vcpu_setcontext already bounces buffers, so it's safe to not do that in your own functions. So: Acked-by: Wei Liu Wei. > Roger.