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-ppc-devel

Re: [Xen-devel] Re: [PATCH] [LIBXC] add architecture-specific parameter

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH] [LIBXC] add architecture-specific parameter to xc_linux_build()
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Thu, 10 Aug 2006 10:57:34 -0500
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, xen-ppc-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 10 Aug 2006 08:57:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C0FFCF76.B2D%Keir.Fraser@xxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
References: <C0FFCF76.B2D%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2006-08-09 at 17:44 +0100, Keir Fraser wrote:
> 
> On 9/8/06 4:14 pm, "Hollis Blanchard" <hollisb@xxxxxxxxxx> wrote:
> 
> > That direction certainly seems like a good one to me.
> > 
> > In this case, we need to load the device tree into the domain's memory
> > and pass its address in a register (i.e. via xc_vcpu_setcontext).
> > Currently it doesn't look like xc_vcpu_setcontext is exposed to python
> > for us to use. What would you like to see here?
> 
> Hmmm... I was expecting you'd want a ppc-specific libxenguest or libxenctrl
> function, but I guess maybe you could do it by more generic means. That
> would obviously be much preferable if it's possible.
> 
> Could a copy_to/from_guest interface exposed to Python be used? Or does the
> device tree need some processing in C into an appropriate format for writing
> into guest memory? As for set/get_vcpu_context, the context could be
> expressed as a Python dictionary mapping register names to (reasonably
> constrained) long values.

I spent some time building the proper binary format in Python (through
lots of struct.pack and '\0'.join), so the C code doesn't need to
reformat it.

However, there are a few values we only determine in C code that need to
be inserted into the device tree:
- initrd start/end -- could be done in Python with an xc.copy_to_guest
- console_mfn/store_mfn -- chosen arbitrarily in C, so could just as
easily be chosen arbitrarily in Python

Actually, I think that may be it... most of the data we can gather in
Python or come directly from the domain config file.

I can implement xc.copy_to_guest() and wc.copy_from_guest() and do the
initrd loading in Python (including using the gzip module). However,
initrd loading in tools/libxc/xc_linux_build.c looks a little more
complicated than I'd feel comfortable modifying without testing, and I'm
not really set up to test x86 changes.

-- 
Hollis Blanchard
IBM Linux Technology Center


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