Re: [XenPPC] Re: New domain builder in xen-unstable

2007-03-15 Thread Gerd Hoffmann
Hollis Blanchard wrote:
> I can't just ifdef PowerPC's xc_linux_build back in, because libelf
> doesn't map page-by-page like the old ELF loader did. That means I need
> to pre-map the memory, which starts dragging in xc_dom infrastructure.

You don't need more xc_dom infrastructure, I've tried to make the libelf
bits independant of the xc_dom stoff for exactly that reason.

Have a look at the hvm loader (xc_hvm_build.c).  It uses libelf too, it
has a loadelfimage() which maps the memory, calls elf_load_binary,
unmaps again.  You could do that too.

Oh, and an example of page-by-page loading using libelf is in
xen/arch/ia64/xen/domain.c.

> What is the difference between dom->shadow_enable and
> xc_dom_feature_translated()?

It's identical now I think.  In the early days (before split-off elf
handling code to libelf) I've tried to use the new domain builder for
hvm too, the logic whevener pfn->mfn translation is needed was a bit
more complex than just looking up shadow_enabled.

HTH,
  Gerd

-- 
Gerd Hoffmann <[EMAIL PROTECTED]>

___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel


Re: [XenPPC] Re: New domain builder in xen-unstable

2007-03-09 Thread Hollis Blanchard
On Wed, 2007-03-07 at 08:27 +, Keir Fraser wrote:
> 
> > The new domain builder infrastructure is not flexible enough for
> > PowerPC, so we're sticking with our own xc_linux_build(). It sounded
> > before like that would be possible, so I assume a20ec270998b was
> just an
> > oversight?
> 
> Hmm yes. You can #ifdef in the Python wrapper for now. But I'm
> surprised that you can't move to the new domain builder at all -- it
> has hooks for arch-dependent code to be inserted already, and we could
> add more if there's a need.

It's pretty complex, which you may not realize since Gerd did the x86
work for you. FYI, I've been working on this for three days, and when
I'm done I will only have un-broken PowerPC. Dubious use of time IMHO.

I can't just ifdef PowerPC's xc_linux_build back in, because libelf
doesn't map page-by-page like the old ELF loader did. That means I need
to pre-map the memory, which starts dragging in xc_dom infrastructure.
I'm tempted to copy-paste-and-hack that infrastructure, but I'm trying
to be a good person and fit into the common code (avoiding ifdefs)
wherever possible.

Here's my current confusion: where are these ELF features described?
Since PowerPC domU communicate only via GPFNs, do I need to set the
"auto-translated" feature?

What is the difference between dom->shadow_enable and
xc_dom_feature_translated()?

-- 
Hollis Blanchard
IBM Linux Technology Center


___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel


Re: [XenPPC] Re: New domain builder in xen-unstable

2007-03-07 Thread Brendan Cully
On Tuesday, 06 March 2007 at 14:56, Hollis Blanchard wrote:
> On Fri, 2007-01-26 at 17:08 +, Keir Fraser wrote:
> > xc_linux_build() is still provided in the 'new world' and is still
> > used by xend. For ia64/x86 it is now a thin wrapper around Gerd's new
> > domain-building infrastructure. For ppc you can continue to have your
> > very own version under libxc/powerpc if you want to, and not use
> > Gerd's new domain-building infrastructure. But the elf code that you
> > rely on is going away, so you need to move to using libelf, which I'm
> > sure Gerd can give you some pointers about. 
> 
> Hi Keir, it turns out I was confused about libxc, and we were depending
> on the just-removed ELF loader. I'm fixing that now; please give me a
> heads-up on the 3.0.5 release so I'm not caught out.
> 
> Aside from that, it seems that xc_linux_build() is actually not called
> by anybody any longer. It looks like changeset a20ec270998b (from
> Brendan) removed the call from xc.c, replacing it with a call to the
> "new style" domain builder via xc_dom_linux_build().
> 
> The new domain builder infrastructure is not flexible enough for
> PowerPC, so we're sticking with our own xc_linux_build(). It sounded
> before like that would be possible, so I assume a20ec270998b was just an
> oversight?

I have to admit, I haven't really looked at how other architectures
are overriding the domain building stuff. Would it be possible to
override xc_dom_linux_build to grab the couple of extra parameters
you need (cmdline, features) from dom and pass them to your existing
xc_linux_build? Then you can pass back elfnotes to python at your
convenience, if/when it makes sense.

___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel


Re: [XenPPC] Re: New domain builder in xen-unstable

2007-03-07 Thread Keir Fraser
On 6/3/07 20:56, "Hollis Blanchard" <[EMAIL PROTECTED]> wrote:

> Hi Keir, it turns out I was confused about libxc, and we were depending
> on the just-removed ELF loader. I'm fixing that now; please give me a
> heads-up on the 3.0.5 release so I'm not caught out.

You have a couple of weeks at least.

> Aside from that, it seems that xc_linux_build() is actually not called
> by anybody any longer. It looks like changeset a20ec270998b (from
> Brendan) removed the call from xc.c, replacing it with a call to the
> "new style" domain builder via xc_dom_linux_build().
> 
> The new domain builder infrastructure is not flexible enough for
> PowerPC, so we're sticking with our own xc_linux_build(). It sounded
> before like that would be possible, so I assume a20ec270998b was just an
> oversight?

Hmm yes. You can #ifdef in the Python wrapper for now. But I'm surprised
that you can't move to the new domain builder at all -- it has hooks for
arch-dependent code to be inserted already, and we could add more if there's
a need.

 -- Keir



___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel


Re: [XenPPC] Re: New domain builder in xen-unstable

2007-03-06 Thread Hollis Blanchard
On Fri, 2007-01-26 at 17:08 +, Keir Fraser wrote:
> xc_linux_build() is still provided in the 'new world' and is still
> used by xend. For ia64/x86 it is now a thin wrapper around Gerd's new
> domain-building infrastructure. For ppc you can continue to have your
> very own version under libxc/powerpc if you want to, and not use
> Gerd's new domain-building infrastructure. But the elf code that you
> rely on is going away, so you need to move to using libelf, which I'm
> sure Gerd can give you some pointers about. 

Hi Keir, it turns out I was confused about libxc, and we were depending
on the just-removed ELF loader. I'm fixing that now; please give me a
heads-up on the 3.0.5 release so I'm not caught out.

Aside from that, it seems that xc_linux_build() is actually not called
by anybody any longer. It looks like changeset a20ec270998b (from
Brendan) removed the call from xc.c, replacing it with a call to the
"new style" domain builder via xc_dom_linux_build().

The new domain builder infrastructure is not flexible enough for
PowerPC, so we're sticking with our own xc_linux_build(). It sounded
before like that would be possible, so I assume a20ec270998b was just an
oversight?

-- 
Hollis Blanchard
IBM Linux Technology Center


___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel