From owner-svn-src-head@freebsd.org Thu Jun 14 10:33:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BACCE101A866; Thu, 14 Jun 2018 10:33:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6FC6982DB6; Thu, 14 Jun 2018 10:33:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50F8727426; Thu, 14 Jun 2018 10:33:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5EAXRJi086943; Thu, 14 Jun 2018 10:33:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5EAXQkL086941; Thu, 14 Jun 2018 10:33:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806141033.w5EAXQkL086941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 14 Jun 2018 10:33:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335131 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 335131 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jun 2018 10:33:27 -0000 Author: kib Date: Thu Jun 14 10:33:26 2018 New Revision: 335131 URL: https://svnweb.freebsd.org/changeset/base/335131 Log: Remove printf() in #NM handler. Give up and remove the almost useless informational message reporting that device not available exception occured while our state tracking indicates the current CPU has FPU context loaded for the current thread. It seems that this is recurring bug with some VM monitors. Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/amd64/fpu.c head/sys/i386/i386/npx.c Modified: head/sys/amd64/amd64/fpu.c ============================================================================== --- head/sys/amd64/amd64/fpu.c Thu Jun 14 10:00:19 2018 (r335130) +++ head/sys/amd64/amd64/fpu.c Thu Jun 14 10:33:26 2018 (r335131) @@ -723,7 +723,12 @@ fpudna(void) KASSERT((curpcb->pcb_flags & PCB_FPUNOSAVE) == 0, ("fpudna while in fpu_kern_enter(FPU_KERN_NOCTX)")); if (PCPU_GET(fpcurthread) == td) { - printf("fpudna: fpcurthread == curthread\n"); + /* + * Some virtual machines seems to set %cr0.TS at + * arbitrary moments. Silently clear the TS bit + * regardless of the eager/lazy FPU context switch + * mode. + */ stop_emulating(); critical_exit(); return; Modified: head/sys/i386/i386/npx.c ============================================================================== --- head/sys/i386/i386/npx.c Thu Jun 14 10:00:19 2018 (r335130) +++ head/sys/i386/i386/npx.c Thu Jun 14 10:33:26 2018 (r335131) @@ -826,9 +826,6 @@ restore_npx_curthread(struct thread *td, struct pcb *p * and not necessarily for every context switch, but it is too hard to * access foreign pcb's. */ - -static int err_count = 0; - int npxdna(void) { @@ -839,8 +836,12 @@ npxdna(void) td = curthread; critical_enter(); if (PCPU_GET(fpcurthread) == td) { - printf("npxdna: fpcurthread == curthread %d times\n", - ++err_count); + /* + * Some virtual machines seems to set %cr0.TS at + * arbitrary moments. Silently clear the TS bit + * regardless of the eager/lazy FPU context switch + * mode. + */ stop_emulating(); critical_exit(); return (1);