From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Tiejun" Subject: Re: [v10][PATCH 07/16] hvmloader/e820: construct guest e820 table Date: Mon, 20 Jul 2015 21:23:27 +0800 Message-ID: <55ACF64F.70702@intel.com> References: <1437373023-14884-1-git-send-email-tiejun.chen@intel.com> <1437373023-14884-8-git-send-email-tiejun.chen@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap 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 >> v10: >> >> * Instead of correcting e820, I'd like to correct memory_map.map[] >> and then copy them into e820 directly. I think this can make sure >> hvm_info, memory_map.map[] and e820 are on the same page. > > Actually, now that you mention it -- this should probably happen > instead when we update hvm_info->{low,high}_mem_pgend. I also considered this point previously but I thought just right now we only update hvm_info->low/high_mem_pgend inside pci_setup(). But you can't guarantee this would be a sole place in the future. Instead, memory_map.map[] would always be copied into e820 when we build e820 table. So I think we'd better do this update once at the last minute. Thanks Tiejun > > I'm happy to leave this where it is for now, so with Jan's comments > addressed (in particular, incrementing nr_map): > > Reviewed-by: George Dunlap > > But if we have time it might be better to pull the loop in pci_setup() > which moves the memory out into a function, and have that function > modify the lowmem and highmem map[] entries at the same time we modify > low_mem_pgend and high_mem_pgend. Alternately, you could put that on > your list of clean-ups to hvmloader for 4.7. > > Thanks, > -George >