From: Wei Liu Subject: Re: [PATCH v2] libxc: fix the types used in xc_dom_image to build HVM guests Date: Fri, 16 Oct 2015 09:50:43 +0100 Message-ID: <20151016085043.GH32638@zion.uk.xensource.com> References: <1444929837-17186-1-git-send-email-roger.pau@citrix.com> <1444985314.1607.134.camel@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 1Zn0iz-0000R8-2L for xen-devel@lists.xenproject.org; Fri, 16 Oct 2015 08:50:53 +0000 Content-Disposition: inline In-Reply-To: <1444985314.1607.134.camel@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: Ian Campbell Cc: xen-devel@lists.xenproject.org, Ian Jackson , Wei Liu , Roger Pau Monne List-Id: xen-devel@lists.xenproject.org On Fri, Oct 16, 2015 at 09:48:34AM +0100, Ian Campbell wrote: > On Thu, 2015-10-15 at 19:23 +0200, Roger Pau Monne wrote: > > Fix the types used to store the memory parameters of an HVM guest, > > previously they defaulted to unsigned long on 32bit toolstack builds, > > which > > is wrong because a 32bit value cannot hold a 64bit memory address that > > crosses the 4GB boundary. > > = > > Signed-off-by: Roger Pau Monn=E9 > > Cc: Ian Jackson > > Cc: Ian Campbell > > Cc: Wei Liu > = > Acked-by: Ian Campbell Acked-by: Wei Liu > = > > --- > > I don't have a 32bit Dom0 at hand, so if someone can try to create a HVM > > guests using a 32bit toolstack with more than 4GB of RAM it would be > > helpful. > = > I am happy after eyeballing that this is at least an improvement and am > content to let osstest answer this question. > = Agreed. > I'm still having some trouble accessing the machines where I typically do > all my semi-automated pre-push build tests but given that these issues ha= ve > been blocking the push gate for a while now I am going to push this change > without the full, i.e. just a quick local adhoc build which I am doing no= w. > = > Ian. > = > > --- > > Changes since v1: > > - Use xen_paddr_t for all the physical address related fields. > > - Use xen_pfn_t for target_pages. > > --- > > tools/libxc/include/xc_dom.h | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > = > > diff --git a/tools/libxc/include/xc_dom.h b/tools/libxc/include/xc_dom.h > > index e52b023..7cb6b0c 100644 > > --- a/tools/libxc/include/xc_dom.h > > +++ b/tools/libxc/include/xc_dom.h > > @@ -187,10 +187,10 @@ struct xc_dom_image { > > = > > /* 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; > > + xen_paddr_t mmio_start; > > + xen_paddr_t mmio_size; > > + xen_paddr_t lowmem_end; > > + xen_paddr_t highmem_end; > > = > > /* Extra ACPI tables passed to HVMLOADER */ > > struct xc_hvm_firmware_module acpi_module;