From owner-freebsd-emulation@FreeBSD.ORG Fri Jun 16 18:57:56 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4C2116A519 for ; Fri, 16 Jun 2006 18:57:56 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4E4843D58 for ; Fri, 16 Jun 2006 18:57:47 +0000 (GMT) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn [127.0.0.1]) by gwyn.kn-bremen.de (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k5GIvhWZ025005 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 16 Jun 2006 20:57:43 +0200 Received: from saturn.kn-bremen.de (uucp@localhost) by gwyn.kn-bremen.de (8.13.4/8.13.4/Submit) with UUCP id k5GIvh69025003; Fri, 16 Jun 2006 20:57:43 +0200 Received: from saturn.kn-bremen.de (nox@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.13.6/8.13.6) with ESMTP id k5GItl5j001527; Fri, 16 Jun 2006 20:55:47 +0200 (CEST) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.13.6/8.13.6/Submit) id k5GItlP1001526; Fri, 16 Jun 2006 20:55:47 +0200 (CEST) (envelope-from nox) Date: Fri, 16 Jun 2006 20:55:47 +0200 (CEST) From: Juergen Lock Message-Id: <200606161855.k5GItlP1001526@saturn.kn-bremen.de> To: nikolas.britton@gmail.com X-Newsgroups: local.list.freebsd.emulation In-Reply-To: Organization: home Cc: freebsd-emulation@freebsd.org Subject: Re: QEMU: npxdna: fpcurthread == curthread 640962 times X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jun 2006 18:57:57 -0000 In article 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?