Re: Per-cpu IDT patch

s ymgch <[email protected]> Wed, 8 Jul 2020 19:10:51 +0900
Newsgroups gmane.os.netbsd.ports.x86-64,gmane.os.netbsd.ports.i386
Message-ID <CAPnD6HrZuDW6n=FhUucQPyvMn=So66g5_BkpOMDi0HVBO-UcAQ@mail.gmail.com>
On Mon, Jul 6, 2020 at 10:45 PM Frank Kardel <[email protected]> wrote:
>
> Nice progress here:
>
> On bare metal 9.99.69 GENERIC boots sees all ixl, wm and nvme devices
> with all their interrupts initialized - great.
>
> BUT... 9.99.69-XEN3_DOM0 digs out following panic:
>
> [   2.0100519] panic: kernel diagnostic assertion "ci->ci_kfpu_spl ==
> -1" failed: file "/src/NetBSD/cur/src/sys/arch/x86/x86/fpu.c", line 389
> [   2.0100519] cpu3: Begin traceback...
> [   2.0100519] vpanic() at netbsd:vpanic+0x146
> [   2.0100519] kern_assert() at netbsd:kern_assert+0x48
> [   2.0100519] fpu_kern_enter() at netbsd:fpu_kern_enter+0x190
> [   2.0100519] cpu3: Begin traceback...
> [   2.0100519] vpanic() at netbsd:vpanic+0x146
> [   2.0100519] kern_assert() at netbsd:kern_assert+0x48
> [   2.0100519] fpu_kern_enter() at netbsd:fpu_kern_enter+0x190
> [   2.0100519] aesni_probe() at netbsd:aesni_probe+0x28
> [   2.0100519] aes_selftest() at netbsd:aes_selftest+0x13
> [   2.0100519] aes_modcmd() at netbsd:aes_modcmd+0xff
> [   2.0100519] module_do_builtin() at netbsd:module_do_builtin+0x173
> [   2.0100519] module_do_builtin() at netbsd:module_do_builtin+0x12e
> [   2.0100519] module_init_class() at netbsd:module_init_class+0x145
> [   2.0100519] main() at netbsd:main+0x472
> [   2.0100519] cpu3: End traceback...
> [   2.0100519] fatal breakpoint trap in supervisor mode
> [   2.0100519] trap type 1 code 0 rip 0xffffffff8023c93d cs 0xe030
> rflags 0x202 cr2 0 ilevel 0x8 rsp 0xffffffff81981af0
> [   2.0100519] curlwp 0xffffffff80e5c6c0 pid 0.0 lowest kstack
> 0xffffffff8197d2c0
> Stopped in pid 0.0 (system) at  netbsd:breakpoint+0x5:  leave

Did it only appear when you applied my patch?
It seems that the assertion happens not in IDT but fpu.

-- yamaguchi