Port-i386 archive

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

Re: panic: fpudna from userland



On Sun, Apr 21, 2024 at 02:22:41PM +0000, Emmanuel Dreyfus wrote:
> On NetBSD-10.0 with XEN3PAE_DOMU kernel, I get this panic when building packages:
> [ 35714.4540347] panic: fpudna from userland, ip 0xbbe74f, trapframe 0xdbe1dfa8

It seems Xen produces spurious fpudna traps, as a comment in the netbsd-9 
source says. What about the workaround below? I have been building stuff
with it without a crash.


--- sys/arch/x86/x86/fpu.c      25 Jul 2023 11:41:42 -0000      1.79.4.2
+++ sys/arch/x86/x86/fpu.c      13 May 2024 14:54:59 -0000
@@ -602,8 +602,17 @@
 
 void
 fpudna(struct trapframe *frame)
 {
+#ifdef XENPV
+       /*
+        * Xen produes spurious fpudna traps, just do nothing.
+        */
+       if (USERMODE(frame->tf_cs)) {
+               clts();
+               return;
+       } 
+#endif
        panic("fpudna from %s, ip %p, trapframe %p",
            USERMODE(frame->tf_cs) ? "userland" : "kernel",
            (void *)X86_TF_RIP(frame), frame);
 }


-- 
Emmanuel Dreyfus
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index