From: Ian Jackson Subject: Re: [PATCH 1/6] xc: use XENMEM_claim_pages hypercall during guest creation. Date: Thu, 28 Mar 2013 16:23:11 +0000 Message-ID: <20820.28271.651677.268634@mariner.uk.xensource.com> References: <1364417739-10121-1-git-send-email-konrad.wilk@oracle.com> <1364417739-10121-2-git-send-email-konrad.wilk@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1364417739-10121-2-git-send-email-konrad.wilk@oracle.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: Konrad Rzeszutek Wilk Cc: Dan Magenheimer , "xen-devel@lists.xensource.com" , Ian Campbell List-Id: xen-devel@lists.xenproject.org Konrad Rzeszutek Wilk writes ("[PATCH 1/6] xc: use XENMEM_claim_pages hypercall during guest creation."): > We add an extra parameter to the structures passed to the > PV routine (arch_setup_meminit) and HVM routine (setup_guest) > that determines whether the claim hypercall is to be done. This looks plausible to me, except that you seem to have missed a comment of Ian Campbell's on the hypercall buffers. > +int xc_domain_claim_pages(xc_interface *xch, > + uint32_t domid, > + unsigned long nr_pages) > +{ > + int err; > + struct xen_memory_reservation reservation = { > + .nr_extents = nr_pages, > + .extent_order = 0, > + .mem_flags = 0, /* no flags */ > + .domid = domid > + }; > + > + set_xen_guest_handle(reservation.extent_start, HYPERCALL_BUFFER_NULL); In response to which Ian C wrote in <1363170195.32410.124.camel@zakaz.uk.xensource.com>: This is unused? I think you just need: set_xen_guest_handle(reservation.extent_start,HYPERCALL_BUFFER_NULL); and drop the declaration of the bounce above. (personally I think a new arg struct for this subop would have been more obvious than forcing it into the reservation struct, but what's done is done) thanks, Ian.