Re: [9fans] Xen and new venti
Hi, this sounds like the problem seen on real hardware a few months ago. the problem was that the kernel plus the page tables didn't fit in the temporary page tables set up in l.s. I removed quite everything... now the kernel is 1113244 byte in the non-gzipped version but the problem persist S.
Re: [9fans] Xen and new venti
Hi, thanks to the suggestion erik gave me I was able to compile the kernel: I just needed to switch from memcpy to memmove into /sys/src/libip/parseip.c and recompile libip and then recompile also /sys/src/libc I moved the kernels to the Xen machine but all of them crashes just after the message Started domain plan9 Am I missing something? S.
Re: [9fans] Xen and new venti
Hi, thanks to the suggestion erik gave me I was able to compile the kernel: I just needed to switch from memcpy to memmove into /sys/src/libip/parseip.c and recompile libip and then recompile also /sys/src/libc I can't see why this should have been necessary - libc contains memcpy already. I have just updated /n/sources/xen/xen3 so it compiles with the current Plan 9 kernel source (using Xen 3.0.2). I made the other changes you listed, but I didn't have to do anything about memcpy. I moved the kernels to the Xen machine but all of them crashes just after the message Started domain plan9 Am I missing something? The present Plan 9 xen kernel works with Xen 3.0.x; you said you are using Xen 3.2.0. Xen is not known for the consistency of its interfaces from one release to the next, so it is quite possible that some rewriting needs to be done on the Plan 9 side to deal with changes in Xen semantics. Have you enabled verbose debugging messages on the Xen console? You should see some indication of why the plan9 guest crashed.
Re: [9fans] Xen and new venti
I can't see why this should have been necessary - libc contains memcpy already. I have just updated /n/sources/xen/xen3 so it compiles with the current Plan 9 kernel source (using Xen 3.0.2). I made the other changes you listed, but I didn't have to do anything about memcpy. the reason it's necessary is that although the kernel links against the c library, it does not include libc.h. this is very much on purpose as not every function in libc is safe for use in the kernel. in this case, the definition for memcpy was likely not picked up in portfns.h so the linker couldn't find the proper function. - erik
Re: [9fans] Xen and new venti
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=0x600, 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.
Re: [9fans] Xen and new venti
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. this sounds like the problem seen on real hardware a few months ago. the problem was that the kernel plus the page tables didn't fit in the temporary page tables set up in l.s. it may be that there's another bug in there. the easiest way to check would be to see if there aren't devices you aren't useing and eliminate them from your xencpuf configuration. stripping venti will also make your kernel smaller. to do this, comment out this line in port/mkportall if(~ $t *executable* ! ~ $name venti) if reducing the size of the kernel solves the problem, then i think it's a good bet, the original problem is not completely solved. - erik
[9fans] Xen and new venti
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.
Re: [9fans] Xen and new venti
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. perhaps you mean that this kernel has an old venti linked in? 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.) mk now gives two errors which I do not know how to fix: ...omissis... size 9xenpcf v4parsecidr: undefined: memcpy in v4parsecidr replace memcpy with memmove. _strayintrx: _ctype: not defined _ctype is used by the is* functions like isascii. - erik