From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] libxc: fix the types used in xc_dom_image to build HVM guests Date: Thu, 15 Oct 2015 18:17:55 +0100 Message-ID: <561FDFC3.2000208@citrix.com> References: <20151015160721.GA5541@zion.uk.xensource.com> <1444926624-16789-1-git-send-email-roger.pau@citrix.com> <1444927298.1607.112.camel@citrix.com> <561FD9CB.7000007@citrix.com> <1444929367.32735.0.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" 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 1ZmmAC-0006UF-Oj for xen-devel@lists.xenproject.org; Thu, 15 Oct 2015 17:18:00 +0000 In-Reply-To: <1444929367.32735.0.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 , =?windows-1252?Q?Roger_Pau_?= =?windows-1252?Q?Monn=E9?= , xen-devel@lists.xenproject.org Cc: Ian Jackson , Wei Liu List-Id: xen-devel@lists.xenproject.org On 15/10/15 18:16, Ian Campbell wrote: > On Thu, 2015-10-15 at 18:52 +0200, Roger Pau Monn=E9 wrote: >> El 15/10/15 a les 18.41, Ian Campbell ha escrit: >>> On Thu, 2015-10-15 at 18:30 +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. >>> This header includes a xen_paddr_t in it which looks like the >> appropriate >>> type for most of these. >>> >>> The ones which have units of pages which you've changed from >> xen_pfn_t to >>> unsigned long (not long long) should surely remain xen_pfn_t? At >> least >>> target_pages should IMHO. >>> >>> lowmem_end doesn't strictly need to be 64-bit, but xen_paddr_t >> seems like >>> the appropriate type semantically nonetheless. >> Right, I didn't realize we had a xen_paddr_t type, thanks to Juergen >> and >> you for pointing it out. mmio_size is not a paddr, so I'm going to >> leave >> it as unsigned long long. > The size of a paddr region can be considered to be a paddr from my PoV. +1. Better to use xen_paddr_t across the board than to mix and match. ~Andrew