Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1037415AbdDUJjR (ORCPT ); Fri, 21 Apr 2017 05:39:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:43502 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S970986AbdDUJhy (ORCPT ); Fri, 21 Apr 2017 05:37:54 -0400 Subject: Re: [PATCH] xen/pvh: Do not fill kernel's e820 map in init_pvh_bootparams() To: Boris Ostrovsky References: <1492709557-26256-1-git-send-email-boris.ostrovsky@oracle.com> Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org From: Juergen Gross Message-ID: <99466772-929a-5f35-0eca-b6658a642fc9@suse.com> Date: Fri, 21 Apr 2017 11:37:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1492709557-26256-1-git-send-email-boris.ostrovsky@oracle.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1604 Lines: 49 On 20/04/17 19:32, Boris Ostrovsky wrote: > e820 map is updated with information from the zeropage (i.e. > pvh_bootparams) by default_machine_specific_memory_setup(). > With the way things are done now, we end up with a duplicated > e820 map. > > Signed-off-by: Boris Ostrovsky > --- > This patch is against for-linus-4.12 branch. Since this is not > a critical issue I don't want to submit it to 4.11 at rc8 time > (plus it will require rebasing for-linus-4.12). > > > arch/x86/xen/enlighten_pvh.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/arch/x86/xen/enlighten_pvh.c b/arch/x86/xen/enlighten_pvh.c > index 331d769..7ce319a9 100644 > --- a/arch/x86/xen/enlighten_pvh.c > +++ b/arch/x86/xen/enlighten_pvh.c > @@ -33,7 +33,6 @@ static void xen_pvh_arch_setup(void) > static void __init init_pvh_bootparams(void) > { > struct xen_memory_map memmap; > - unsigned int i; > int rc; > > memset(&pvh_bootparams, 0, sizeof(pvh_bootparams)); > @@ -60,12 +59,7 @@ static void __init init_pvh_bootparams(void) > sanitize_e820_map(pvh_bootparams.e820_map, > ARRAY_SIZE(pvh_bootparams.e820_map), > &memmap.nr_entries); Sorry, only saw it now: can't you just delete the sanitize_e820_map() call, too? Juergen > - > pvh_bootparams.e820_entries = memmap.nr_entries; > - for (i = 0; i < pvh_bootparams.e820_entries; i++) > - e820_add_region(pvh_bootparams.e820_map[i].addr, > - pvh_bootparams.e820_map[i].size, > - pvh_bootparams.e820_map[i].type); > > pvh_bootparams.hdr.cmd_line_ptr = > pvh_start_info.cmdline_paddr; >