[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 3/4] tools/init-dom0less: Avoid hardcoding GUEST_MAGIC_BASE



On Mon, 20 May 2024, Jason Andryuk wrote:
> On 2024-05-16 23:21, Henry Wang wrote:
> > Currently the GUEST_MAGIC_BASE in the init-dom0less application is
> > hardcoded, which will lead to failures for 1:1 direct-mapped Dom0less
> > DomUs.
> > 
> > Since the guest magic region allocation from init-dom0less is for
> > XenStore, and the XenStore page is now allocated from the hypervisor,
> > instead of hardcoding the guest magic pages region, use
> > xc_hvm_param_get() to get the XenStore page PFN. Rename alloc_xs_page()
> > to get_xs_page() to reflect the changes.
> > 
> > With this change, some existing code is not needed anymore, including:
> > (1) The definition of the XenStore page offset.
> > (2) Call to xc_domain_setmaxmem() and xc_clear_domain_page() as we
> >      don't need to set the max mem and clear the page anymore.
> > (3) Foreign mapping of the XenStore page, setting of XenStore interface
> >      status and HVM_PARAM_STORE_PFN from init-dom0less, as they are set
> >      by the hypervisor.
> > 
> > Take the opportunity to do some coding style improvements when possible.
> > 
> > Reported-by: Alec Kwapis <alec.kwapis@xxxxxxxxxxxxx>
> > Signed-off-by: Henry Wang <xin.wang2@xxxxxxx>
> 
> Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>

Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.