Date: Fri, 16 Jun 2006 20:55:47 +0200 (CEST) From: Juergen Lock <nox@jelal.kn-bremen.de> To: nikolas.britton@gmail.com Cc: freebsd-emulation@freebsd.org Subject: Re: QEMU: npxdna: fpcurthread == curthread 640962 times Message-ID: <200606161855.k5GItlP1001526@saturn.kn-bremen.de> In-Reply-To: <ef10de9a0606131730m7ec33522q2b2273eb3d44d603@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <ef10de9a0606131730m7ec33522q2b2273eb3d44d603@mail.gmail.com> you write:
>I'm getting these messages on the console when I run QEMU with kqemu
>kernel module:
>npxdna: fpcurthread == curthread 640957 times
>npxdna: fpcurthread == curthread 640958 times
>npxdna: fpcurthread == curthread 640959 times
>npxdna: fpcurthread == curthread 640960 times
>npxdna: fpcurthread == curthread 640961 times
>npxdna: fpcurthread == curthread 640962 times
>
>What are these and how do I make them stop?
>[...]
Ok since the previous thread on this,
http://lists.freebsd.org/pipermail/freebsd-emulation/2006-May/002081.html
didnt end with a consensus on how to fix it, I've made a band-aid
patch that simply disables the message for the kqemu case: (which
_appears_ to be harmless there, maybe because qemu doesnt seem to
be using the fpu while calling kqemu)
Index: sys/i386/isa/npx.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/isa/npx.c,v
retrieving revision 1.162.2.1.2.2
diff -u -r1.162.2.1.2.2 npx.c
--- sys/i386/isa/npx.c 30 Apr 2006 05:17:59 -0000 1.162.2.1.2.2
+++ sys/i386/isa/npx.c 16 Jun 2006 18:03:23 -0000
@@ -756,6 +756,9 @@
if (!npx_exists)
return (0);
if (PCPU_GET(fpcurthread) == curthread) {
+#if 1
+ if (strcmp(curthread->td_proc->p_comm, "qemu"))
+#endif
printf("npxdna: fpcurthread == curthread %d times\n",
++err_count);
stop_emulating();
Of course I don't ask for something like this be committed, it is just
for ppl for who the messages cause trouble. Similar patch for amd64
(untested):
Index: sys/amd64/amd64/trap.c
===================================================================
RCS file: /home/ncvs/src/sys/amd64/amd64/trap.c,v
retrieving revision 1.289.2.3
diff -u -r1.289.2.3 trap.c
--- sys/amd64/amd64/trap.c 28 Nov 2005 20:03:03 -0000 1.289.2.3
+++ sys/amd64/amd64/trap.c 16 Jun 2006 18:31:01 -0000
@@ -359,6 +359,9 @@
* registered such use.
*/
if (fpudna()) {
+#if 1
+ if (strcmp(curthread->td_proc->p_comm, "qemu"))
+#endif
printf("fpudna in kernel mode!\n");
goto out;
}
And finally a question for the experts: could this be fixed for real
once the dfly fpu patch mentioned in the `Adding optimized kernel
copying support' thread,
http://lists.freebsd.org/pipermail/freebsd-arch/2006-June/005267.html
is committed?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606161855.k5GItlP1001526>
