DragonFly users List (threaded) for 2009-05
DragonFly BSD
DragonFly users List (threaded) for 2009-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Kqemu and SIGFPE with Linux guest


From: Naoya Sugioka <naoya.sugioka@xxxxxxxxx>
Date: Thu, 28 May 2009 17:37:56 -0700

Hi again,

Now, I'm trying to bring Linux guest (Gentoo latest/ CentOS 5.3) working under
Kqemu/DragonFly 2.3.1 on x86 (32bit) and facing a kernel related problem.

For both Linux guests, I saw SIGFPE will be returned from DragonFly kernel when
Linux is booting. Then qemu has crashed. SIGFPE comes from npxpop()/npxpush()
/npxdna() according to the core dump/kernel trace log.

Since I'm very new around this area (sys/platform/pc32/isa/npx.c),
I just disabled SIGFPE,  then I found Linux host is now working. nice :-)

. .. so far, my questions are:

When should SIGFPE be raised on a real host from these npx.c? ...any
expectations ?
Especially npxpop()/npxpush() seems to me a work-around, according to the past
mailing list. Do we still need them ?

 If SIGFPE should be raised, how kqemu/qemu should handle these signals from
 kernel engineer's point of view ?

Off course, the diff file is not a suggested patch. just FYI.
Please let me know any thoughts on this as well. thank you.
-Naoya


/var/log/messages with unmodified HEAD kernel
--------------------------------------------------------------
$ grep qemu /var/log/messages
May 28 05:17:07 lpata kernel: Preloaded elf module
"/boot/modules/kqemu.ko" at 0xc0946660.
May 28 05:17:07 lpata kernel: kqemu version 0x00010400
May 28 05:17:07 lpata kernel: kqemu: KQEMU installed, max_locked_mem=1567732kB.
May 28 06:25:33 lpata kernel: pid 1010 (qemu) signal return from user:
illegal FP MXCSR 00009fc0
May 28 06:25:40 lpata kernel: pid 1010 (qemu), uid 0: exited on signal
8 (core dumped)

then-> SIGFPE is raised

/var/log/messages with npxpop()/npxpush() comment-out HEAD kernel
-----------------------------------------------------------------------------------
May 28 09:33:37 lpata kernel: Preloaded elf module
"/boot/modules/kqemu.ko" at 0xc08bf660.
May 28 09:33:37 lpata kernel: kqemu version 0x00010400
May 28 09:33:37 lpata kernel: kqemu: KQEMU installed, max_locked_mem=1568000kB.
May 28 09:37:46 lpata kernel: FXRSTR: illegal FP MXCSR 00009fc0 didinit = 0

then -> SIGFPE is raised.

+ prevent npxdna() SIGFPE
--------------------------------------------------------------------------------------------------------
-> SIGFPE is not raised. Linux has booted, yeh!


How to repro
========
1. install kqemu/qemu
2. boot Linux guest with kqemu (-kernel-kqemu ), then you'll see Linux is
    failed at the bootstrap, around clock or udev operation.
3. Apply the diff (prevent to raise SIGFPE from npx*)
    then install this modified kernel
4. Now you can see Linux is booted.

Attachment: sigfpe.diff
Description: Binary data



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]