From: Andy Fiddaman <illumos@fiddaman.net>
To: Carsten Grzemba via illumos-discuss <discuss@lists.illumos.org>
Subject: Re: [discuss] BAD TRAP: type=7 (#nm Device not available) rp=fffffe0019e3d780 addr=0
Date: Tue, 11 Mar 2025 10:54:38 +0000 (UTC) [thread overview]
Message-ID: <9c34d582-f837-4614-b9d2-d6685c0f0a48@fiddaman.net> (raw)
In-Reply-To: <17416877060.A4eA.3424@composer.illumos.topicbox.com>
On Tue, 11 Mar 2025, Carsten Grzemba via illumos-discuss wrote:
> Recently I see an crash dump with
>
> NOTICE: SAM-QFS: samfs1: Initiated mount filesystem
>
> panic[cpu3]/thread=fffffe0019e3dc20:
> BAD TRAP: type=7 (#nm Device not available) rp=fffffe0019e3d780 addr=0
>
...
> sam_map_block+0x6f: pxor %xmm0,%xmm0
>
> I build this kernel module with GCC14.
>
> I have no clear understanding what "Bad trap: type=7 (#nm Device not available) " means. Looking on the assembler instruction "pxor %xmm0,%xmm0" seems that here special multimedia registers are used.
nm - No Math(s) Co-processor
(or at least that's what I've always read it as.)
This is a result of trying to use a floating-point or SIMD instruction (which
`pxor` is) when the CR0.TS bit is set. There's a good theory statement on
kernel FPU use in:
https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/intel/os/fpu.c#L124-L126
In general kernel code cannot use FPU/SIMD instructions unless they make
use of kernel_fpu_begin() and kernel_fpu_end() around them. In this case,
I suspect you need to tell the compiler to avoid such instructions.
Regards,
Andy
------------------------------------------
illumos: illumos-discuss
Permalink: https://illumos.topicbox.com/groups/discuss/Te2d5885af4d3b9f6-M1ef829f6547a474f98d1f851
Delivery options: https://illumos.topicbox.com/groups/discuss/subscription
next prev parent reply other threads:[~2025-03-11 10:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 10:08 Carsten Grzemba via illumos-discuss
2025-03-11 10:54 ` Andy Fiddaman [this message]
2025-03-11 10:56 ` Toomas Soome via illumos-discuss
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9c34d582-f837-4614-b9d2-d6685c0f0a48@fiddaman.net \
--to=illumos@fiddaman.net \
--cc=discuss@lists.illumos.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).