From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH RFC v1 04/13] libxc: allow arch_setup_meminit to populate HVM domain memory Date: Thu, 25 Jun 2015 11:33:47 +0100 Message-ID: <20150625103347.GE6545@zion.uk.xensource.com> References: <1434989487-74940-1-git-send-email-roger.pau@citrix.com> <1434989487-74940-5-git-send-email-roger.pau@citrix.com> <20150625102934.GD6545@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z84Th-00048y-4F for xen-devel@lists.xenproject.org; Thu, 25 Jun 2015 10:33:53 +0000 Content-Disposition: inline In-Reply-To: <20150625102934.GD6545@zion.uk.xensource.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 Monne Cc: Elena Ufimtseva , Wei Liu , Ian Campbell , Stefano Stabellini , Andrew Cooper , Ian Jackson , Jan Beulich , xen-devel@lists.xenproject.org, Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org On Thu, Jun 25, 2015 at 11:29:34AM +0100, Wei Liu wrote: > On Mon, Jun 22, 2015 at 06:11:18PM +0200, Roger Pau Monne wrote: > > Introduce a new arch_setup_meminit_hvm that's going to be used to popul= ate > > HVM domain memory. Rename arch_setup_meminit to arch_setup_meminit_hvm_= pv > = > arch_setup_meminit_hvm/pv > = > > and introduce a stub arch_setup_meminit that will call the right meminit > > function depending on the contains type. > > = > > Signed-off-by: Roger Pau Monn=E9 > > Cc: Ian Jackson > > Cc: Stefano Stabellini > > Cc: Ian Campbell > > Cc: Wei Liu > > Cc: Jan Beulich > > Cc: Andrew Cooper > > Cc: Boris Ostrovsky > > Cc: Konrad Rzeszutek Wilk > > Cc: Elena Ufimtseva > > --- > > I think that both arch_setup_meminit_hvm and arch_setup_meminit_pv coul= d be > > unified into a single meminit function. I have however not looked into = it, > > and just created arch_setup_meminit_hvm based on the code in > > xc_hvm_populate_memory. > > --- > > tools/libxc/include/xc_dom.h | 8 + > > tools/libxc/xc_dom_x86.c | 365 +++++++++++++++++++++++++++++++++++= ++++++-- > > tools/libxl/libxl_dom.c | 1 + > > 3 files changed, 362 insertions(+), 12 deletions(-) > > = > > diff --git a/tools/libxc/include/xc_dom.h b/tools/libxc/include/xc_dom.h > > index f7b5f0f..051a7de 100644 > > --- a/tools/libxc/include/xc_dom.h > > +++ b/tools/libxc/include/xc_dom.h > > @@ -186,6 +186,14 @@ struct xc_dom_image { > > XC_DOM_PV_CONTAINER, > > XC_DOM_HVM_CONTAINER, > > } container_type; > > + > > + /* HVM specific fields. */ > > + xen_pfn_t target_pages; > > + xen_pfn_t mmio_start; > > + xen_pfn_t mmio_size; > > + xen_pfn_t lowmem_end; > > + xen_pfn_t highmem_end; > = > These fields are in xc_hvm_build_args. I think you can use that > structure. Never mind this. I see you delete that structure later. > = > > + int vga_hole; > = > bool vga_hole. > = > Wei.