9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] xen3: fresh build 9xenpccpuf dies on boot
@ 2013-09-12  7:44 Yaroslav
  2013-09-12  8:04 ` Richard Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Yaroslav @ 2013-09-12  7:44 UTC (permalink / raw)
  To: 9fans

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

Re-build of 9xenpccpuf, the PV Xen guest kernel built from sources at
/n/sources/xen/xen3/9), with latest changes in sys/src/9/port/,
sys/src/libc/ and others - resulted in non-functional kernel: it dies
on boot with attached diagnostics.
I haven't looked further yet.

[-- Attachment #2: xen.png --]
[-- Type: image/png, Size: 31688 bytes --]

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

* Re: [9fans] xen3: fresh build 9xenpccpuf dies on boot
  2013-09-12  7:44 [9fans] xen3: fresh build 9xenpccpuf dies on boot Yaroslav
@ 2013-09-12  8:04 ` Richard Miller
  2013-09-12 13:48   ` Yaroslav
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Miller @ 2013-09-12  8:04 UTC (permalink / raw)
  To: 9fans

The crash seems to be in init, not the kernel.  Are you sure
your file system image is good?




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

* Re: [9fans] xen3: fresh build 9xenpccpuf dies on boot
  2013-09-12  8:04 ` Richard Miller
@ 2013-09-12 13:48   ` Yaroslav
  2013-09-12 13:54     ` erik quanstrom
  0 siblings, 1 reply; 6+ messages in thread
From: Yaroslav @ 2013-09-12 13:48 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> The crash seems to be in init, not the kernel.  Are you sure
> your file system image is good?

it doesn't get far enough for "root from:", so it seems to fail
somewhere in the initcode blob



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

* Re: [9fans] xen3: fresh build 9xenpccpuf dies on boot
  2013-09-12 13:48   ` Yaroslav
@ 2013-09-12 13:54     ` erik quanstrom
  2013-09-13  8:16       ` Yaroslav
  0 siblings, 1 reply; 6+ messages in thread
From: erik quanstrom @ 2013-09-12 13:54 UTC (permalink / raw)
  To: yarikos, 9fans

On Thu Sep 12 09:49:19 EDT 2013, yarikos@gmail.com wrote:
> > The crash seems to be in init, not the kernel.  Are you sure
> > your file system image is good?
>
> it doesn't get far enough for "root from:", so it seems to fail
> somewhere in the initcode blob

this may be related to the change put in for the routerboard.

it increased the size of Tos, and thus shifted everything around
on the stack.  but the old pc kernel didn't account for this, and
386 kernels failed with bad arg in syscall.  this never affected the
pae kernel, or the other architectures.  here's the fix as it went
into 9atom.

; 9fs atom
; cd /n/atom/plan9/sys/src/9/pc
; history -D main.c
Aug  3 15:30:45 EDT 2013 main.c 16439 [quanstro]
Aug  3 15:30:45 EDT 2013 /n/atomdump/2013/0912/plan9/sys/src/9/pc/main.c 16439 [quanstro]
10a11
> #include	<tos.h>
25a27,31
> enum {
> 	/* space for syscall args, return PC, top-of-stack struct */
> 	Ustkheadroom	= sizeof(Sargs) + sizeof(uintptr) + sizeof(Tos),
> };
>
294c300
< 	sp = (uchar*)base + BY2PG - MAXSYSARG*BY2WD;
---
> 	sp = (uchar*)base + BY2PG - Ustkheadroom;

- erik



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

* Re: [9fans] xen3: fresh build 9xenpccpuf dies on boot
  2013-09-12 13:54     ` erik quanstrom
@ 2013-09-13  8:16       ` Yaroslav
  2013-09-13 20:28         ` Richard Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Yaroslav @ 2013-09-13  8:16 UTC (permalink / raw)
  To: 9fans, 9fans

Thanks, Erik, your guess is absolutely right... Richard, do you mind
updating /n/sources/xen/xen3/9/xen3/main.c?

term% diff -c /n/sources/xen/xen3/9/xen3/main.c
/n/sources/contrib/yk/xen3/main.c
/n/sources/xen/xen3/9/xen3/main.c:8,13 - /n/sources/contrib/yk/xen3/main.c:8,14
  #include "init.h"
  #include "pool.h"
  #include "reboot.h"
+ #include <tos.h>

  Mach *m;

/n/sources/xen/xen3/9/xen3/main.c:15,20 -
/n/sources/contrib/yk/xen3/main.c:16,26
  #define BOOTARGSLEN (sizeof xenstart->cmd_line)
  #define MAXCONF 64

+ enum {
+ /* space for syscall args, return PC, top-of-stack struct */
+ Ustkheadroom = sizeof(Sargs) + sizeof(uintptr) + sizeof(Tos),
+ };
+
  char bootdisk[KNAMELEN];
  Conf conf;
  char *confname[MAXCONF];
/n/sources/xen/xen3/9/xen3/main.c:270,276 -
/n/sources/contrib/yk/xen3/main.c:276,282
  uchar *av[32];
  uchar **lsp;

- sp = (uchar*)base + BY2PG - MAXSYSARG*BY2WD;
+ sp = (uchar*)base + BY2PG - Ustkheadroom;

  ac = 0;
  av[ac++] = pusharg("/386/9dos");

2013/9/12 erik quanstrom <quanstro@quanstro.net>:
> On Thu Sep 12 09:49:19 EDT 2013, yarikos@gmail.com wrote:
>> > The crash seems to be in init, not the kernel.  Are you sure
>> > your file system image is good?
>>
>> it doesn't get far enough for "root from:", so it seems to fail
>> somewhere in the initcode blob
>
> this may be related to the change put in for the routerboard.
>
> it increased the size of Tos, and thus shifted everything around
> on the stack.  but the old pc kernel didn't account for this, and
> 386 kernels failed with bad arg in syscall.  this never affected the
> pae kernel, or the other architectures.  here's the fix as it went
> into 9atom.
>
> ; 9fs atom
> ; cd /n/atom/plan9/sys/src/9/pc
> ; history -D main.c
> Aug  3 15:30:45 EDT 2013 main.c 16439 [quanstro]
> Aug  3 15:30:45 EDT 2013 /n/atomdump/2013/0912/plan9/sys/src/9/pc/main.c 16439 [quanstro]
> 10a11
>> #include      <tos.h>
> 25a27,31
>> enum {
>>       /* space for syscall args, return PC, top-of-stack struct */
>>       Ustkheadroom    = sizeof(Sargs) + sizeof(uintptr) + sizeof(Tos),
>> };
>>
> 294c300
> <       sp = (uchar*)base + BY2PG - MAXSYSARG*BY2WD;
> ---
>>       sp = (uchar*)base + BY2PG - Ustkheadroom;
>
> - erik



--
- Yaroslav



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

* Re: [9fans] xen3: fresh build 9xenpccpuf dies on boot
  2013-09-13  8:16       ` Yaroslav
@ 2013-09-13 20:28         ` Richard Miller
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Miller @ 2013-09-13 20:28 UTC (permalink / raw)
  To: 9fans

> Thanks, Erik, your guess is absolutely right... Richard, do you mind
> updating /n/sources/xen/xen3/9/xen3/main.c?

Done, thanks to both of you.




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

end of thread, other threads:[~2013-09-13 20:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-12  7:44 [9fans] xen3: fresh build 9xenpccpuf dies on boot Yaroslav
2013-09-12  8:04 ` Richard Miller
2013-09-12 13:48   ` Yaroslav
2013-09-12 13:54     ` erik quanstrom
2013-09-13  8:16       ` Yaroslav
2013-09-13 20:28         ` Richard Miller

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).