[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 4/4] libxc: Pass e820 map to PVH guest via hvm_start_info
On Thu, Mar 15, 2018 at 02:35:18PM -0700, Maran Wilson wrote: > From: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> > > Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> > Signed-off-by: Maran Wilson <maran.wilson@xxxxxxxxxx> > --- > tools/libxc/xc_dom_x86.c | 30 +++++++++++++++++++++++++++++- > 1 file changed, 29 insertions(+), 1 deletion(-) > > diff --git a/tools/libxc/xc_dom_x86.c b/tools/libxc/xc_dom_x86.c > @@ -1718,6 +1724,27 @@ static int bootlate_hvm(struct xc_dom_image *dom) > > /* ACPI module 0 is the RSDP */ > start_info->rsdp_paddr = dom->acpi_modules[0].guest_addr_out ? : 0; > + > + /* > + * Check a couple of XEN_HVM_MEMMAP_TYPEs to verify consistency with > + * their corresponding e820 numerical values. > + */ > + BUILD_BUG_ON(XEN_HVM_MEMMAP_TYPE_RAM != E820_RAM); > + BUILD_BUG_ON(XEN_HVM_MEMMAP_TYPE_ACPI != E820_ACPI); I guess you could test all the types, but I'm not sure if it's worth it, let's see what others think. > + > + modsize = HVMLOADER_MODULE_MAX_COUNT * > + (sizeof(*modlist) + HVMLOADER_MODULE_CMDLINE_SIZE); > + memmap = (void*)modlist + modsize; ^ space. > + > + start_info->memmap_paddr = (dom->start_info_seg.pfn << PAGE_SHIFT) + > + ((uintptr_t)modlist - (uintptr_t)start_info) + > modsize; > + start_info->memmap_entries = dom->e820_entries; > + for ( i = 0; i < dom->e820_entries; i++ ) > + { > + memmap[i].addr = dom->e820[i].addr; > + memmap[i].size = dom->e820[i].size; > + memmap[i].type = dom->e820[i].type; > + } I see no reason to do this for the PVH type only, you should pass the memory map to both PVH and HVM (and it's going to reduce the indentation). Thanks, Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |