summaryrefslogtreecommitdiff
path: root/arch/x86/xen
diff options
context:
space:
mode:
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>2017-04-21 11:13:14 -0400
committerJuergen Gross <jgross@suse.com>2017-05-02 11:17:39 +0200
commit5f6a1614fab801834e32b420b60acdc27acfcdec (patch)
tree52a3c914f7913b44d9508e0ade5b63f959957a6c /arch/x86/xen
parent6483e3135a693548874429db901c0544d3a9b4cd (diff)
downloadlinux-next-5f6a1614fab801834e32b420b60acdc27acfcdec.tar.gz
xen/pvh: Do not fill kernel's e820 map in init_pvh_bootparams()
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 <boris.ostrovsky@oracle.com> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r--arch/x86/xen/enlighten_pvh.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/arch/x86/xen/enlighten_pvh.c b/arch/x86/xen/enlighten_pvh.c
index a4272c8620ce..98ab17673454 100644
--- a/arch/x86/xen/enlighten_pvh.c
+++ b/arch/x86/xen/enlighten_pvh.c
@@ -34,7 +34,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));
@@ -46,26 +45,19 @@ static void __init init_pvh_bootparams(void)
xen_raw_printk("XENMEM_memory_map failed (%d)\n", rc);
BUG();
}
+ pvh_bootparams.e820_entries = memmap.nr_entries;
- if (memmap.nr_entries < E820_MAX_ENTRIES_ZEROPAGE - 1) {
- pvh_bootparams.e820_table[memmap.nr_entries].addr =
+ if (pvh_bootparams.e820_entries < E820_MAX_ENTRIES_ZEROPAGE - 1) {
+ pvh_bootparams.e820_table[pvh_bootparams.e820_entries].addr =
ISA_START_ADDRESS;
- pvh_bootparams.e820_table[memmap.nr_entries].size =
+ pvh_bootparams.e820_table[pvh_bootparams.e820_entries].size =
ISA_END_ADDRESS - ISA_START_ADDRESS;
- pvh_bootparams.e820_table[memmap.nr_entries].type =
+ pvh_bootparams.e820_table[pvh_bootparams.e820_entries].type =
E820_TYPE_RESERVED;
- memmap.nr_entries++;
+ pvh_bootparams.e820_entries++;
} else
xen_raw_printk("Warning: Can fit ISA range into e820\n");
- pvh_bootparams.e820_entries = memmap.nr_entries;
- for (i = 0; i < pvh_bootparams.e820_entries; i++)
- e820__range_add(pvh_bootparams.e820_table[i].addr,
- pvh_bootparams.e820_table[i].size,
- pvh_bootparams.e820_table[i].type);
-
- e820__update_table(e820_table);
-
pvh_bootparams.hdr.cmd_line_ptr =
pvh_start_info.cmdline_paddr;