9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Plan 9 Xen -- Follow up on previous 9fans topic
@ 2009-10-02 13:21 Jack Norton
  2009-10-02 14:15 ` Andreas Eriksen
  2009-10-02 21:41 ` Alex Lee
  0 siblings, 2 replies; 9+ messages in thread
From: Jack Norton @ 2009-10-02 13:21 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


Hello,

I would like to know if the fellow below (Andreas Erikson), ever tried
to compile plan 9 xen3 sources against xen 3.2.x (or 3.[2-4].x for that
matter).   I am going to try that this weekend, and if he started to
patch some code, I would appreciate the head start.

 >From: Richard Miller <9fans@ham...> Subject: Running Plan 9 on Xen 3.2
Date: Tue, 30 Jun 2009 08:57:25 +0100
 >> From: Andreas Eriksen <andreer@pvv...>
 >> Does this mean Plan 9 is not compatible with Xen 3.2, or does it just
 >> need a recompile or some other quick fix?
 >It's compatible with Xen 3.0.x for some x. I haven't checked how much
the Xen API has changed for 3.2 -- do try recompiling and see what
happens! > of the source files are no longer >world readable Sorry, my
fault. Fixed now. -- Richard


-Jack



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] Plan 9 Xen -- Follow up on previous 9fans topic
  2009-10-02 13:21 [9fans] Plan 9 Xen -- Follow up on previous 9fans topic Jack Norton
@ 2009-10-02 14:15 ` Andreas Eriksen
  2009-10-02 21:41 ` Alex Lee
  1 sibling, 0 replies; 9+ messages in thread
From: Andreas Eriksen @ 2009-10-02 14:15 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I tried, but it was beyond my limited time and understanding. I hope  
you succeed. I am using Xen (specifically, Citrix XenServer) in a  
project I am working on now, and would very much like to run Plan 9 as  
a part of that.

Good luck!

–Andreas

On 2. Oct, 2009, at 3:21 PM, Jack Norton wrote:

>
> Hello,
>
> I would like to know if the fellow below (Andreas Erikson), ever  
> tried to compile plan 9 xen3 sources against xen 3.2.x (or 3.[2-4].x  
> for that matter).   I am going to try that this weekend, and if he  
> started to patch some code, I would appreciate the head start.
>
> >From: Richard Miller <9fans@ham...> Subject: Running Plan 9 on Xen  
> 3.2 Date: Tue, 30 Jun 2009 08:57:25 +0100
> >> From: Andreas Eriksen <andreer@pvv...>
> >> Does this mean Plan 9 is not compatible with Xen 3.2, or does it  
> just
> >> need a recompile or some other quick fix?
> >It's compatible with Xen 3.0.x for some x. I haven't checked how  
> much the Xen API has changed for 3.2 -- do try recompiling and see  
> what happens! > of the source files are no longer >world readable  
> Sorry, my fault. Fixed now. -- Richard
>
>
> -Jack
>




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] Plan 9 Xen -- Follow up on previous 9fans topic
  2009-10-02 13:21 [9fans] Plan 9 Xen -- Follow up on previous 9fans topic Jack Norton
  2009-10-02 14:15 ` Andreas Eriksen
@ 2009-10-02 21:41 ` Alex Lee
  2009-10-03 10:06   ` Richard Miller
  1 sibling, 1 reply; 9+ messages in thread
From: Alex Lee @ 2009-10-02 21:41 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, Oct 2, 2009 at 8:21 AM, Jack Norton <jack@0x6a.com> wrote:
> I would like to know if the fellow below (Andreas Erikson), ever tried to
> compile plan 9 xen3 sources against xen 3.2.x (or 3.[2-4].x for that
> matter).   I am going to try that this weekend, and if he started to patch
> some code, I would appreciate the head start.

This doesn't give much of an answer to Jack's question, but in case it
is of use:

I recently tried compiling a 9xen kernel, because I wanted to run Plan
9 with Debian Lenny, which has a prepackaged Xen 3.2.1 system.

The kernel did not compile against the most recent sources. There was
a mismatch in the function prototype of cpuid in pc/fns.h and
xen3/fns.h that caused compilation to fail: void cpuid(int, ulong
regs[]) versus void cpuid(char*, int*, int*).

I had an older install CD image, from around Aug 2008, so tried again
using sources from that. This time compilation worked, but Xen
rejected the kernel and gave some sort of version mismatch error
(which I think is the same error it gave when I tried booting
Richard's precompiled 3.0.2–4 kernels).

Sorry for the lack of detail; I don't have Xen 3.2.1 running anymore,
so I can't run it again to see the exact message. If I find time I'll
try it again. I'd love to hear if anyone else has made more progress.
Unfortunately, like Andreas, I'm lacking in the time and know-how to
contribute much to this.

In the end I just installed the Xen system from Etch (oldstable),
which uses Xen 3.0.3. Richard's kernels boot and have been working
great (thanks, Ron and Richard, for your work on this!).

Alex


>>>From: Richard Miller <9fans@ham...> Subject: Running Plan 9 on Xen 3.2
>> Date: Tue, 30 Jun 2009 08:57:25 +0100
>>>> From: Andreas Eriksen <andreer@pvv...>
>>> Does this mean Plan 9 is not compatible with Xen 3.2, or does it just
>>> need a recompile or some other quick fix?
>>It's compatible with Xen 3.0.x for some x. I haven't checked how much the
>> Xen API has changed for 3.2 -- do try recompiling and see what happens! > of
>> the source files are no longer >world readable Sorry, my fault. Fixed now.
>> -- Richard
>
>
> -Jack


-- 
Alex Lee <alexlee@uchicago.edu>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] Plan 9 Xen -- Follow up on previous 9fans topic
  2009-10-02 21:41 ` Alex Lee
@ 2009-10-03 10:06   ` Richard Miller
  2009-10-04 22:57     ` Andreas Eriksen
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Miller @ 2009-10-03 10:06 UTC (permalink / raw)
  To: 9fans

> The kernel did not compile against the most recent sources.

I've fixed this so it compiles again with current kernel source.
Haven't tried booting it on anything, though.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] Plan 9 Xen -- Follow up on previous 9fans topic
  2009-10-03 10:06   ` Richard Miller
@ 2009-10-04 22:57     ` Andreas Eriksen
  2009-10-05  9:01       ` Richard Miller
  2009-10-12 14:24       ` Richard Miller
  0 siblings, 2 replies; 9+ messages in thread
From: Andreas Eriksen @ 2009-10-04 22:57 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

>> The kernel did not compile against the most recent sources.
>
> I've fixed this so it compiles again with current kernel source.
> Haven't tried booting it on anything, though.


I successfully compiled against Xen 3.4.1 and tried to boot it on  
XenServer 5.0r3, but unfortunately it failed with roughly the same  
error as the precompiled kernel on sources:

elf_xen_addr_calc_check: ERROR: ELF_PADDR_OFFSET set, VIRT_BASE unset

When compiling, I can see that VIRT_BASE is given as an argument to  
xenelf in the makefile, like this:

XENELF='LOADER=generic,XEN_VER=xen-3.0,ELF_PADDR_OFFSET=0,\
	VIRT_BASE='$KZERO',VIRT_ENTRY='$KTZERO',PAE='$PAE

Now I may be way off here, but I though that perhaps the tab character  
in front of
VIRT_BASE here may cause it to not be recognized by xenelf. I joined  
it into one line,
and I am rewarded with a different error message:

"xc_dom_alloc_segment: segment start isn't page aligned".

I really don't know if this is better or worse. I'm just poking around  
at random trying
to figure all of this out :-)

– Andreas


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] Plan 9 Xen -- Follow up on previous 9fans topic
  2009-10-04 22:57     ` Andreas Eriksen
@ 2009-10-05  9:01       ` Richard Miller
  2009-10-12 14:24       ` Richard Miller
  1 sibling, 0 replies; 9+ messages in thread
From: Richard Miller @ 2009-10-05  9:01 UTC (permalink / raw)
  To: 9fans

> Now I may be way off here, but I though that perhaps the tab character
> in front of
> VIRT_BASE here may cause it to not be recognized by xenelf. I joined
> it into one line,
> and I am rewarded with a different error message:
>
> "xc_dom_alloc_segment: segment start isn't page aligned".

Sorry, I've been working with Alex Lee on this in private email
and we had got to this stage yesterday.  I'm just about to modify
the elf-postprocessing step to align segments in the elf file to
make xen 3.2 happy.

We'll copy Andreas into this conversation too.  Anybody else
interested?  I don't think the whole of 9fans wants to hear about the
convolutions necessary to keep up with xen's API churn.  (Xen 3.0 was
perfectly able to deal with whitespace in parameter lists and
non-page-aligned elf file sections.  This is progress?)




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] Plan 9 Xen -- Follow up on previous 9fans topic
  2009-10-04 22:57     ` Andreas Eriksen
  2009-10-05  9:01       ` Richard Miller
@ 2009-10-12 14:24       ` Richard Miller
  1 sibling, 0 replies; 9+ messages in thread
From: Richard Miller @ 2009-10-12 14:24 UTC (permalink / raw)
  To: 9fans

/n/sources/xen/xen3 is now updated (source and pre-built kernels) to
be compatible with Xen 3.2 - tested (thanks to Alex and Andreas) with:

  Xen 3.2.1 (debian package xen-linux-system-2.6.26-2-xen-686)
  XenServer 5.5

It also still boots on Xen 3.0.2.

I have to retract my remarks about Xen API churn: this time it was
only necessary to massage the ELF boot file format, and compensate
for one typo in Xen's 3.2 include headers; no kernel logic changes
were needed.  There may be lots of new API we aren't using, but
it appears our legacy approach is still supported.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] Plan 9 Xen -- Follow up on previous 9fans topic
  2009-10-04 23:01 ` erik quanstrom
@ 2009-10-04 23:22   ` Andreas Eriksen
  0 siblings, 0 replies; 9+ messages in thread
From: Andreas Eriksen @ 2009-10-04 23:22 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 779 bytes --]

>> Now I may be way off here, but I though that perhaps the tab
>> character
>> in front of
>> VIRT_BASE here may cause it to not be recognized by xenelf. I joined
>> it into one line,
>> and I am rewarded with a different error message:
>>
>> "xc_dom_alloc_segment: segment start isn't page aligned".
>>
>> I really don't know if this is better or worse. I'm just poking
>> around
>> at random trying
>> to figure all of this out :-)
>
> sounds better.  what's $KTZERO?
>
> - erik

The full xenelf command line is

./xenelf 9xenpcf __xen_guest
''LOADER
=
generic
,XEN_VER
=
xen
-3.0
,ELF_PADDR_OFFSET=0,VIRT_BASE=0x80000000,VIRT_ENTRY=0x80010020,PAE=yes''

This is after i modified the mkfile, using "mk 'PAE=yes'" and
compiling against xen-3.4.1.

[-- Attachment #2: Type: text/html, Size: 1541 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] Plan 9 Xen -- Follow up on previous 9fans topic
       [not found] <<26F7BB92-E55B-4E9E-BDB5-813DB9F63A10@pvv.ntnu.no>
@ 2009-10-04 23:01 ` erik quanstrom
  2009-10-04 23:22   ` Andreas Eriksen
  0 siblings, 1 reply; 9+ messages in thread
From: erik quanstrom @ 2009-10-04 23:01 UTC (permalink / raw)
  To: 9fans

> Now I may be way off here, but I though that perhaps the tab character
> in front of
> VIRT_BASE here may cause it to not be recognized by xenelf. I joined
> it into one line,
> and I am rewarded with a different error message:
>
> "xc_dom_alloc_segment: segment start isn't page aligned".
>
> I really don't know if this is better or worse. I'm just poking around
> at random trying
> to figure all of this out :-)

sounds better.  what's $KTZERO?

- erik



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-10-12 14:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-02 13:21 [9fans] Plan 9 Xen -- Follow up on previous 9fans topic Jack Norton
2009-10-02 14:15 ` Andreas Eriksen
2009-10-02 21:41 ` Alex Lee
2009-10-03 10:06   ` Richard Miller
2009-10-04 22:57     ` Andreas Eriksen
2009-10-05  9:01       ` Richard Miller
2009-10-12 14:24       ` Richard Miller
     [not found] <<26F7BB92-E55B-4E9E-BDB5-813DB9F63A10@pvv.ntnu.no>
2009-10-04 23:01 ` erik quanstrom
2009-10-04 23:22   ` Andreas Eriksen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).