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
This commit is contained in:
Konstantin Belousov 2018-06-14 10:33:26 +00:00
parent c338c94d20
commit fa7fad8ab9
2 changed files with 12 additions and 6 deletions

View File

@ -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;

View File

@ -826,9 +826,6 @@ restore_npx_curthread(struct thread *td, struct pcb *pcb)
* 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);