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:29:34 +0100 Message-ID: <20150625102934.GD6545@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> 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 1Z84Pm-0003Re-Oj for xen-devel@lists.xenproject.org; Thu, 25 Jun 2015 10:29:50 +0000 Content-Disposition: inline In-Reply-To: <1434989487-74940-5-git-send-email-roger.pau@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 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 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 populate > 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 could = 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. > + int vga_hole; bool vga_hole. Wei.