9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Xen and new venti
@ 2008-03-03 23:15 stella
  2008-03-04  0:52 ` erik quanstrom
  0 siblings, 1 reply; 9+ messages in thread
From: stella @ 2008-03-03 23:15 UTC (permalink / raw)
  To: 9fans

Hi,
I'm trying to install plan9 under Xen 3.2.0 with venti
but the kernel avaiable on the web is too old to support nventi.
I decided to try to compile it but there were some troubles I was able to fix
(with the help of #plan9). Now there's a problem (or two) I do not know
how to solve; I must inform you that I'm not an expert of both plan9 and C.
This is what I did:

9fs sources
cpr /n/sources/xen/xen3/9 /sys/src/9
cd /sys/src/9/xen3

then I got /usr/local/xen from my xen installation and put it under xen-public
I edited xenpcf to remove il support

mk

I had a problem of type in xendat.h fixed by replacing
uint8 with uint at line 1540

mk

I had some other problems which I fixed by
1) adding void	mfence(void); into fns.h
2) editing line 286 in sdxen.c to look like
	 xenbio(SDunit* unit, int lun, int write, void* data, long nb, uvlong bno)
3) adding /$objtype/lib/libip.a\ to LIB in mkfile
4) adding in l.s
TEXT mfence(SB), $0
	BYTE $0x0f
	BYTE $0xae
	BYTE $0xf0
	RET

mk now gives two errors which I do not know how to fix:
...omissis...
size 9xenpcf
v4parsecidr: undefined: memcpy in v4parsecidr
_strayintrx: _ctype: not defined
mk: 8c -FVw '-DKERNDATE='`{date ...  : exit status=rc 7851: 8l 7855: error

any idea?
Thank you

S.


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [9fans] Xen and new venti
@ 2008-03-05  0:18 stella
  2008-03-05  0:37 ` erik quanstrom
  0 siblings, 1 reply; 9+ messages in thread
From: stella @ 2008-03-05  0:18 UTC (permalink / raw)
  To: 9fans

Hi,
Frist of all a note for erik:
	>> I had a problem of type in xendat.h fixed by replacing
	>> uint8 with uint at line 1540

	>i suspect you mean uchar.  (or uvlong if they're counting
	>bytes.)
I meant uint [or so I remember] but I can't give any explanation for this

I tryed both compiling the kernel with xen 3.2.0 and xen 3.0.2 include files with the same result
I've debugging active on xen so I will paste at the end what happens
In any case it's odd that the kernels from /n/sources/xen/xen3 boots smoothly on xen 3.2.0
[without venti of course ] while the others do not.

Sorry if the following paste is not polite

S.

PS: I have no Xen 3.0.2 to test the kernel with but I'm willing to give it to anyone who does.

Booting a fresh built 9xenpcf.gz Xend says:

[2008-03-05 01:04:46 3685] DEBUG (XendDomainInfo:84) XendDomainInfo.create([\047vm\047, [\047name\047, \047plan9-noventi-new\047], [\047memory\047, 96], [\047on_crash\047, \047preserve\047], [\047vcpus\047, 1], [\047on_xend_start\047, \047ignore\047], [\047on_xend_stop\047, \047ignore\047], [\047image\047, [\047linux\047, [\047kernel\047, \047/mnt/allanon/hdb3/xen/plan9/9xenpcf.gz\047], [\047args\047, \047\nbootargs=local!#S/sd00/fossil\n\047]]], [\047device\047, [\047vbd\047, [\047uname\047, \047file:/mnt/allanon/hdb3/xen/plan9/plan9-noventi.img\047], [\047dev\047, \047sda\047], [\047mode\047, \047w\047]]], [\047device\047, [\047vif\047, [\047mac\047, \047aa:00:10:00:00:10\047]]]])
[2008-03-05 01:04:46 3685] DEBUG (XendDomainInfo:1608) XendDomainInfo.constructDomain
[2008-03-05 01:04:46 3685] DEBUG (balloon:132) Balloon: 99244 KiB free; need 2048; done.
[2008-03-05 01:04:46 3685] DEBUG (XendDomain:443) Adding Domain: 59
[2008-03-05 01:04:46 3685] DEBUG (XendDomainInfo:1692) XendDomainInfo.initDomain: 59 256
[2008-03-05 01:04:46 3685] DEBUG (XendDomainInfo:1724) _initDomain:shadow_memory=0x0, memory_static_max=0x6000000, memory_static_min=0x0.
[2008-03-05 01:04:46 3685] DEBUG (balloon:132) Balloon: 99244 KiB free; need 98304; done.
[2008-03-05 01:04:46 3685] INFO (image:139) buildDomain os=linux dom=59 vcpus=1
[2008-03-05 01:04:46 3685] DEBUG (image:351) domid          = 59
[2008-03-05 01:04:46 3685] DEBUG (image:352) memsize        = 96
[2008-03-05 01:04:46 3685] DEBUG (image:353) image          = /mnt/allanon/hdb3/xen/plan9/9xenpcf.gz
[2008-03-05 01:04:46 3685] DEBUG (image:354) store_evtchn   = 1
[2008-03-05 01:04:46 3685] DEBUG (image:355) console_evtchn = 2
[2008-03-05 01:04:46 3685] DEBUG (image:356) cmdline        =
bootargs=local!#S/sd00/fossil

[2008-03-05 01:04:46 3685] DEBUG (image:357) ramdisk        =
[2008-03-05 01:04:46 3685] DEBUG (image:358) vcpus          = 1
[2008-03-05 01:04:46 3685] DEBUG (image:359) features       =
[2008-03-05 01:04:46 3685] INFO (XendDomainInfo:1504) createDevice: vbd : {\047uuid\047: \047df218b35-05a8-72c7-5bc9-aad542df2721\047, \047bootable\047: 1, \047driver\047: \047paravirtualised\047, \047dev\047: \047sda\047, \047uname\047: \047file:/mnt/allanon/hdb3/xen/plan9/plan9-noventi.img\047, \047mode\047: \047w\047}
[2008-03-05 01:04:46 3685] DEBUG (DevController:117) DevController: writing {\047virtual-device\047: \0472048\047, \047device-type\047: \047disk\047, \047protocol\047: \047x86_32-abi\047, \047backend-id\047: \0470\047, \047state\047: \0471\047, \047backend\047: \047/local/domain/0/backend/vbd/59/2048\047} to /local/domain/59/device/vbd/2048.
[2008-03-05 01:04:46 3685] DEBUG (DevController:119) DevController: writing {\047domain\047: \047plan9-noventi-new\047, \047frontend\047: \047/local/domain/59/device/vbd/2048\047, \047uuid\047: \047df218b35-05a8-72c7-5bc9-aad542df2721\047, \047dev\047: \047sda\047, \047state\047: \0471\047, \047params\047: \047/mnt/allanon/hdb3/xen/plan9/plan9-noventi.img\047, \047mode\047: \047w\047, \047online\047: \0471\047, \047frontend-id\047: \04759\047, \047type\047: \047file\047} to /local/domain/0/backend/vbd/59/2048.
[2008-03-05 01:04:46 3685] INFO (XendDomainInfo:1504) createDevice: vif : {\047mac\047: \047aa:00:10:00:00:10\047, \047uuid\047: \04798f63ee9-c9dc-1749-de75-d2438bd58ccf\047}
[2008-03-05 01:04:46 3685] DEBUG (DevController:117) DevController: writing {\047mac\047: \047aa:00:10:00:00:10\047, \047handle\047: \0470\047, \047protocol\047: \047x86_32-abi\047, \047backend-id\047: \0470\047, \047state\047: \0471\047, \047backend\047: \047/local/domain/0/backend/vif/59/0\047} to /local/domain/59/device/vif/0.
[2008-03-05 01:04:46 3685] DEBUG (DevController:119) DevController: writing {\047domain\047: \047plan9-noventi-new\047, \047handle\047: \0470\047, \047uuid\047: \04798f63ee9-c9dc-1749-de75-d2438bd58ccf\047, \047script\047: \047/etc/xen/scripts/vif-bridge\047, \047state\047: \0471\047, \047frontend\047: \047/local/domain/59/device/vif/0\047, \047mac\047: \047aa:00:10:00:00:10\047, \047online\047: \0471\047, \047frontend-id\047: \04759\047} to /local/domain/0/backend/vif/59/0.
[2008-03-05 01:04:46 3685] DEBUG (XendDomainInfo:2181) Storing VM details: {\047on_xend_stop\047: \047ignore\047, \047shadow_memory\047: \0470\047, \047uuid\047: \04736c10d21-e91e-f15e-f1ac-64c5e807d144\047, \047on_reboot\047: \047restart\047, \047start_time\047: \0471204675486.48\047, \047on_poweroff\047: \047destroy\047, \047on_xend_start\047: \047ignore\047, \047on_crash\047: \047preserve\047, \047xend/restart_count\047: \0470\047, \047vcpus\047: \0471\047, \047vcpu_avail\047: \0471\047, \047image\047: "(linux (kernel /mnt/allanon/hdb3/xen/plan9/9xenpcf.gz) (args \047\\nbootargs=local!#S/sd00/fossil\\n\047) (notes))", \047name\047: \047plan9-noventi-new\047}
[2008-03-05 01:04:46 3685] DEBUG (XendDomainInfo:1001) Storing domain details: {\047console/ring-ref\047: \047101524\047, \047console/port\047: \0472\047, \047name\047: \047plan9-noventi-new\047, \047console/limit\047: \0471048576\047, \047vm\047: \047/vm/36c10d21-e91e-f15e-f1ac-64c5e807d144\047, \047domid\047: \04759\047, \047store/port\047: \0471\047, \047cpu/0/availability\047: \047online\047, \047memory/target\047: \04798304\047, \047control/platform-feature-multiprocessor-suspend\047: \0471\047, \047store/ring-ref\047: \047101525\047, \047console/type\047: \047xenconsoled\047}
[2008-03-05 01:04:46 3685] DEBUG (DevController:117) DevController: writing {\047protocol\047: \047x86_32-abi\047, \047state\047: \0471\047, \047backend-id\047: \0470\047, \047backend\047: \047/local/domain/0/backend/console/59/0\047} to /local/domain/59/device/console/0.
[2008-03-05 01:04:46 3685] DEBUG (DevController:119) DevController: writing {\047domain\047: \047plan9-noventi-new\047, \047protocol\047: \047vt100\047, \047uuid\047: \04755e48b49-814a-e7d7-7118-4511acf7239e\047, \047frontend\047: \047/local/domain/59/device/console/0\047, \047state\047: \0471\047, \047location\047: \0472\047, \047online\047: \0471\047, \047frontend-id\047: \04759\047} to /local/domain/0/backend/console/59/0.
[2008-03-05 01:04:46 3685] DEBUG (XendDomainInfo:1085) XendDomainInfo.handleShutdownWatch
[2008-03-05 01:04:46 3685] DEBUG (DevController:150) Waiting for devices vif.
[2008-03-05 01:04:46 3685] DEBUG (DevController:155) Waiting for 0.
[2008-03-05 01:04:46 3685] DEBUG (DevController:594) hotplugStatusCallback /local/domain/0/backend/vif/59/0/hotplug-status.
[2008-03-05 01:04:47 3685] DEBUG (DevController:594) hotplugStatusCallback /local/domain/0/backend/vif/59/0/hotplug-status.
[2008-03-05 01:04:47 3685] DEBUG (DevController:608) hotplugStatusCallback 1.
[2008-03-05 01:04:47 3685] DEBUG (DevController:150) Waiting for devices vbd.
[2008-03-05 01:04:47 3685] DEBUG (DevController:155) Waiting for 2048.
[2008-03-05 01:04:47 3685] DEBUG (DevController:594) hotplugStatusCallback /local/domain/0/backend/vbd/59/2048/hotplug-status.
[2008-03-05 01:04:47 3685] DEBUG (DevController:594) hotplugStatusCallback /local/domain/0/backend/vbd/59/2048/hotplug-status.
[2008-03-05 01:04:47 3685] DEBUG (DevController:608) hotplugStatusCallback 1.
[2008-03-05 01:04:47 3685] DEBUG (DevController:150) Waiting for devices irq.
[2008-03-05 01:04:47 3685] DEBUG (DevController:150) Waiting for devices vkbd.
[2008-03-05 01:04:47 3685] DEBUG (DevController:150) Waiting for devices vfb.
[2008-03-05 01:04:47 3685] DEBUG (DevController:150) Waiting for devices console.
[2008-03-05 01:04:47 3685] DEBUG (DevController:155) Waiting for 0.
[2008-03-05 01:04:47 3685] DEBUG (DevController:150) Waiting for devices pci.
[2008-03-05 01:04:47 3685] DEBUG (DevController:150) Waiting for devices ioports.
[2008-03-05 01:04:47 3685] DEBUG (DevController:150) Waiting for devices tap.
[2008-03-05 01:04:47 3685] DEBUG (DevController:150) Waiting for devices vtpm.
[2008-03-05 01:04:47 3685] INFO (XendDomain:1165) Domain plan9-noventi-new (59) unpaused.
[2008-03-05 01:04:47 3685] WARNING (XendDomainInfo:1248) Domain has crashed: name=plan9-noventi-new id=59.
[2008-03-05 01:04:47 3685] INFO (XendDomainInfo:1440) Preserving dead domain plan9-noventi-new (59).


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [9fans] Xen and new venti
@ 2008-03-08 20:11 Richard Miller
  0 siblings, 0 replies; 9+ messages in thread
From: Richard Miller @ 2008-03-08 20:11 UTC (permalink / raw)
  To: 9fans

OK, I've found the real cause of the errors which stella@plan9.jp
was seeing when linking 9xen kernels:

> v4parsecidr: undefined: memcpy in v4parsecidr
> _strayintrx: _ctype: not defined

In the definition of LIB= in the mkfile, if libc.a is listed before
libip.a, you get the above errors (for any kernel, not just xen ones).
This is because there are no direct references to libc.a functions
from the kernel itself, only from something in libip.a which was
added recently.  So the linker needs to see libip.a before libc.a
in order to know what references to resolve.

If you simply move libc.a after libip.a, it works fine without having
to change any source code.

I've now rebuilt all the 9xen*.gz kernels in /n/sources/xen/xen3
using the current Plan 9 kernel and nventi.  They work with Xen
3.0.x; no guarantees about 3.2.x but it's worth trying.

-- Richard



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

end of thread, other threads:[~2008-03-08 20:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-03 23:15 [9fans] Xen and new venti stella
2008-03-04  0:52 ` erik quanstrom
2008-03-04 21:38   ` stella
2008-03-04 22:18     ` Richard Miller
2008-03-04 22:26       ` erik quanstrom
2008-03-05  0:18 stella
2008-03-05  0:37 ` erik quanstrom
2008-03-05  8:10   ` stella
2008-03-08 20:11 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).