[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4.1] libxc: Defer initialization of start_page for HVM guests
On Thu, 2016-01-07 at 17:11 -0500, Boris Ostrovsky wrote: > With commit 8c45adec18e0 ("libxc: create unmapped initrd in domain > builder if supported") location of ramdisk may not be available to > HVMlite guests by the time alloc_magic_pages_hvm() is invoked if the > guest supports unmapped initrd. > > So let's move ramdisk info initialization (along with a few other > operations that are not directly related to allocating magic/special > pages) from alloc_magic_pages_hvm() to bootlate_hvm(). The "few other operations" are just the hvm_info init for standard HVM by this iteration? > --- a/tools/libxc/include/xc_dom.h > +++ b/tools/libxc/include/xc_dom.h > @@ -71,6 +71,7 @@ struct xc_dom_image { > Â > ÂÂÂÂÂ/* arguments and parameters */ > ÂÂÂÂÂchar *cmdline; > +ÂÂÂÂsize_t cmdline_size; Perhaps /* Including NULL and padding/alignment */ ? (That's the sort of thing I don't mind doing on commit if there is agreement and no other changes required) > @@ -1095,8 +1044,8 @@ static int vcpu_hvm(struct xc_dom_image *dom) > ÂÂÂÂÂ/* Set the IP. */ > ÂÂÂÂÂbsp_ctx.cpu.rip = dom->parms.phys_entry; > Â > -ÂÂÂÂif ( dom->start_info_pfn ) > -ÂÂÂÂÂÂÂÂbsp_ctx.cpu.rbx = dom->start_info_pfn << PAGE_SHIFT; > +ÂÂÂÂif ( dom->start_info_seg.pfn ) > +ÂÂÂÂÂÂÂÂbsp_ctx.cpu.rbx = dom->start_info_seg.pfn << PAGE_SHIFT; Just to check:Âdom->start_info_pfn is unused/nil in the regular-hvm case, correct (i.e. this code is dm-list specific both before and after)? > +ÂÂÂÂelse > +ÂÂÂÂ{ > +ÂÂÂÂÂÂÂÂvoid *hvm_info_page; > + > +ÂÂÂÂÂÂÂÂif ( (hvm_info_page = xc_map_foreign_range( > +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂxch, domid, PAGE_SIZE, PROT_READ | PROT_WRITE, > +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂHVM_INFO_PFN)) == NULL ) > +ÂÂÂÂÂÂÂÂÂÂÂÂreturn -1; > +ÂÂÂÂÂÂÂÂbuild_hvm_info(hvm_info_page, dom); > +ÂÂÂÂÂÂÂÂmunmap(hvm_info_page, PAGE_SIZE); > +ÂÂÂÂ} Did you test regular HVM guests after this movement? Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |