WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH RFC 0/5] Grant table for console, xenstore pages

To: "Diego Ongaro" <diego.ongaro@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH RFC 0/5] Grant table for console, xenstore pages
From: "Derek Murray" <Derek.Murray@xxxxxxxxxxxx>
Date: Sat, 12 Jul 2008 19:34:52 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sat, 12 Jul 2008 11:35:16 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :sender:to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=PIqmyiDmm/IUsDIkKpqIsWJuhaNS9Uxhn+8WbCIiH7A=; b=fDcdERuO7toRxHIZf3gw4KcNOGlO1hRH8nx0k24gBt77kTH936CT9lXmO0m5mcyqvN VqRHABXa7DMaLXY4dS+7sQm7e60QCbF9aEiJvWz47ZkypBPqMtCft0Hngy9o3wmj0uLt Kzqij6EL6j18fCx5tLNJFAq4LsVF0ZO8+bp7M=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references:x-google-sender-auth; b=De89MEoC05jylKuMM21nKZPchDWNYxI5MT7Q+DiIYbWWaa455G+Y9Lng7+7pq8g/fl uAAz5t2MMUrlyRwK9HUmtHoXvb+hYc8V08q9gA0If5WXmb93W+raVFN6ejKIyabq0pzc JZN6+gcAXOq+rknLhotvg0l/Y0E2a3G7wJqZs=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4877B09E.5000909@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4877B09E.5000909@xxxxxxxxxx>
Reply-to: Derek.Murray@xxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Diego,

I imagine you've already ready seen this, but the thread beginning
here has some historical context:

http://lists.xensource.com/archives/html/xense-devel/2007-05/msg00004.html

So the main points to note will be:
* The patches won't work on Dom0s without gntdev support (e.g. at
present Solaris, or older XenoLinux kernels). I'm not sure of the
current status but a question mark still hangs over gntdev in
pv_ops-Dom0, though your patches might give some impetus to find a
solution.
* Have you tested with domain save/restore? Apparently (per
http://lists.xensource.com/archives/html/xense-devel/2007-05/msg00011.html
), the grant table is reset upon restore, so you may need to reinstall
the grants for the console and XenStore.
* There was some argument against fixed grant references for the
console and store pages, though this would require modifying the
interface to the domain builder.

I would imagine, considering the previous discussion, that you may
want to retain the existing ring-ref values, and it should be possible
to continue with the old method. Apart from that, the idea and
implementation look pretty sound!

Regards,

Derek Murray.

On Fri, Jul 11, 2008 at 8:12 PM, Diego Ongaro <diego.ongaro@xxxxxxxxxx> wrote:
> I'm working on moving xenstored into a dedicated, unprivileged domain.
> This is the first set of patches I'm sending out towards that goal. I
> understand there is currently a freeze, so I'm just looking for feedback
> at this point.
>
> Each domU shares one of its pages with the xenstore daemon from its
> creation. The domain builder writes the mfn for this page in the domU's
> start info page. Then it sends the xenstore daemon an "introduce"
> command, giving it the new domU's domid, this mfn to map, and an unbound
> port in the domU to bind.
>
> However, if the xenstore daemon resides in an unprivileged domain, it is
> not permitted to map an arbitrary mfn. Instead, it could use the
> existing grant table mechanism. In fact, the first 8 grant table entries
> for each domU are reserved for cases like this. (DomU's don't use the
> first 8 entries.)
>
> Because the console and the xenstore mechanisms are so similar, these
> patches include analogous changes for console support as well.
>
> The first patch claims one 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. At this stage, the grant entries just
> give access to domain 0 (addressed in a later patch).
>
> The next two patches modify the xenstore daemon and the console daemon,
> respectively, to use xc_gnttab_map_grant_ref instead of
> xc_map_foreign_range.
>
> The final two patches implement a way to determine in which domains the
> console and xenstore daemons reside. If each of the files
> /var/run/{console,xenstore}.did contains an integer, this integer is
> interpreted as the domain id for that daemon. The default or fallback is
> domid=0, of course. In patch 4, libxc is modified to use this mechanism
> for the grant table entries. In patch 5, xend is modified to use this
> mechanism for the allocated unbound ports.
>
> To get the discussion going, what should be done about xenstore's
> /local/domain/#/device/{console,store}/ring-ref ? I don't think they're
> necessary anymore, but I've made no effort to remove them.
>
> Thanks,
> Diego Ongaro
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>

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