From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [v7][PATCH 07/16] hvmloader/e820: construct guest e820 table Date: Thu, 16 Jul 2015 10:41:51 +0100 Message-ID: References: <1436420047-25356-1-git-send-email-tiejun.chen@intel.com> <1436420047-25356-8-git-send-email-tiejun.chen@intel.com> <55A70FD9.1050704@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55A70FD9.1050704@intel.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: "Chen, Tiejun" Cc: Keir Fraser , Ian Campbell , Stefano Stabellini , Andrew Cooper , Ian Jackson , "xen-devel@lists.xen.org" , Jan Beulich , Wei Liu List-Id: xen-devel@lists.xenproject.org On Thu, Jul 16, 2015 at 2:58 AM, Chen, Tiejun wrote: >> I think I would say: >> >> -- >> Now use the hypervisor-supplied memory map to build our final e820 table: >> * Add regions for BIOS ranges and other special mappings not in the >> hypervisor map >> * Add in the hypervisor regions >> * Adjust the lowmem and highmem regions if we've had to relocate >> memory (adding a highmem region if necessary) >> * Sort all the ranges so that they appear in memory order. >> -- > > > I'll update this and thanks a lot. > >> >>> >>> CC: Keir Fraser >>> CC: Jan Beulich >>> CC: Andrew Cooper >>> CC: Ian Jackson >>> CC: Stefano Stabellini >>> CC: Ian Campbell >>> CC: Wei Liu >>> Signed-off-by: Tiejun Chen >>> --- > > > [snip] > >>> + /* Low RAM goes here. Reserve space for special pages. */ >>> + BUG_ON(low_mem_end < (2u << 20)); >> >> >> Won't this BUG if the guest was actually given less than 2GiB of RAM? > > > 2u << 20 = 0x200000, so this is 2M, not 2G :) Oh, right. :-) -George