Subject: Xen 1.2 - problems solved!
To: None <port-xen@netbsd.org>
From: Michael Kukat <michael@unixiron.org>
List: port-xen
Date: 12/13/2004 13:12:19
STRRRRIKE!

I got it working now, at least in vmware:

First: don't use CPU optimizations in your kernel. Even -mcpu=pentium breaks
stuff. But maybe i find out more, as the main problems for now seemed to have
something to do with idle issues. And this is what i solved 5 minutes ago. If
you call the Xen scheduler, you should tell it what to do :) This could be
cleaned up a bit to use SCHEDOP_yield, but at least the problems is tracked
down and you can include the following patch into the kernel sources:

diff -Naru sys.orig/arch/xen/i386/locore.S sys/arch/xen/i386/locore.S
--- sys.orig/arch/xen/i386/locore.S     2004-09-23 04:41:01.000000000 +0200
+++ sys/arch/xen/i386/locore.S  2004-12-13 13:51:57.000000000 +0100
@@ -1610,6 +1610,7 @@
        jmp     idle_start
 4:
        movl    $__HYPERVISOR_yield,%eax
+       movl    $0,%ebx
        TRAP_INSTR
 NENTRY(mpidle)
 idle_start:

The symbol __HYPERVISOR_yield is somewhat misleading, as it is the operation
for HYPERVISOR_sched_op, which has the value 8. SCHEDOP_yield (0) must go to
ebx to tell Xen to yield.

I really don't know if i am right in this place, it just came to my eyes as
not being very correct, as ebx is not really defined for the TRAP_INSTR.

Overall performance doesn't look very good currently, but i'll ignore this
currently. There is enough to do now. At first, i'll try this out in a "real"
environment the next days and clean up this patch a bit. Maybe there come in
more optimizations, i'll keep you informed.

...Michael

-- 
http://www.unixiron.org/    Home Powered by: (Net|Open|Free)BSD IRIX NonStop-UX
Solaris AIX HP-UX Tru64 MUNIX Ultrix VMS SINIX Dolphin_Unix OpenStep MacOS A/UX