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

Re: [Xen-devel] [PATCH 06/18] lib{xc, xl}: Seed grant tables with xenstore and console grants



On Thu, 2012-01-12 at 15:11 +0000, Daniel De Graaf wrote:
> On 01/12/2012 04:59 AM, Ian Campbell wrote:
> > On Wed, 2012-01-11 at 17:21 +0000, Daniel De Graaf wrote:
> >> From: Alex Zeffertt <alex.zeffertt@xxxxxxxxxxxxx>
> >>
> >> This patch claims one reserved grant entry for the console and another
> >> for the xenstore. It modifies the builder to fill in the grant table
> >> entries for the console and the xenstore.
> >>
> >> This has not been tested with any kind of migration.
> >>
> > [...]
> >> diff --git a/tools/libxc/xc_domain_restore.c 
> >> b/tools/libxc/xc_domain_restore.c
> >> index 3fda6f8..23619da 100644
> >> --- a/tools/libxc/xc_domain_restore.c
> >> +++ b/tools/libxc/xc_domain_restore.c
> >> @@ -2018,6 +2018,15 @@ int xc_domain_restore(xc_interface *xch, int io_fd, 
> >> uint32_t dom,
> >>          memcpy(ctx->live_p2m, ctx->p2m, dinfo->p2m_size * 
> >> sizeof(xen_pfn_t));
> >>      munmap(ctx->live_p2m, P2M_FL_ENTRIES * PAGE_SIZE);
> >>
> >> +/* TODO don't hardcode zero here */
> >> +    rc = xc_dom_gnttab_seed(xch, dom,
> >> +                            *console_mfn, *store_mfn, 0, 0);
> > 
> > Presumably this TODO is the source of the comment in the changelog WRT
> > migration.
> > 
> > Does it Just Work or is there a legitimate TODO item here?
> > 
> > Ian.
> > 
> > 
> 
> This causes migration to only work if xenstored/xenconsoled are both in
> dom0, as the domain ID for both of them are hardcoded to zero. Determining
> the correct values for these domain IDs is more difficult than the domain
> build case, because they may not be the same as when the domain was built
> (especially if we are migrating).
> 
> The previous patch series used a domid file named similarly to a pid file
> to identify the location of xenstored and xenconsoled; this method would
> allow the TODO to be resolved. I think a better solution is to refer to the
> xenstore/xenconsole domains by name instead of domid, and set the names in
> a configuration file (/etc/xen/xl.conf?). This would also replace the
> xenstore_dom/console_dom parameters in patch #5.

That would work. You could also stash the necessary parameters in
xenstore from the tool which starts the stub-xenstored such that the
toolstack can look them up as needed. That avoids having to have an
xl.conf variable.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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