svn commit: r264147 - in stable/10/sys: amd64/amd64 i386/i386

Konstantin Belousov kib at FreeBSD.org
Sat Apr 5 14:24:30 UTC 2014


Author: kib
Date: Sat Apr  5 14:24:29 2014
New Revision: 264147
URL: http://svnweb.freebsd.org/changeset/base/264147

Log:
  MFC r263912:
  Clear the kernel grab of the FPU state on fork.

Modified:
  stable/10/sys/amd64/amd64/vm_machdep.c
  stable/10/sys/i386/i386/vm_machdep.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/amd64/amd64/vm_machdep.c
==============================================================================
--- stable/10/sys/amd64/amd64/vm_machdep.c	Sat Apr  5 14:09:16 2014	(r264146)
+++ stable/10/sys/amd64/amd64/vm_machdep.c	Sat Apr  5 14:24:29 2014	(r264147)
@@ -446,7 +446,8 @@ cpu_set_upcall(struct thread *td, struct
 	 * values here.
 	 */
 	bcopy(td0->td_pcb, pcb2, sizeof(*pcb2));
-	clear_pcb_flags(pcb2, PCB_FPUINITDONE | PCB_USERFPUINITDONE);
+	clear_pcb_flags(pcb2, PCB_FPUINITDONE | PCB_USERFPUINITDONE |
+	    PCB_KERNFPU);
 	pcb2->pcb_save = get_pcb_user_save_pcb(pcb2);
 	bcopy(get_pcb_user_save_td(td0), pcb2->pcb_save,
 	    cpu_max_ext_state_size);

Modified: stable/10/sys/i386/i386/vm_machdep.c
==============================================================================
--- stable/10/sys/i386/i386/vm_machdep.c	Sat Apr  5 14:09:16 2014	(r264146)
+++ stable/10/sys/i386/i386/vm_machdep.c	Sat Apr  5 14:24:29 2014	(r264147)
@@ -457,7 +457,8 @@ cpu_set_upcall(struct thread *td, struct
 	 * values here.
 	 */
 	bcopy(td0->td_pcb, pcb2, sizeof(*pcb2));
-	pcb2->pcb_flags &= ~(PCB_NPXINITDONE | PCB_NPXUSERINITDONE);
+	pcb2->pcb_flags &= ~(PCB_NPXINITDONE | PCB_NPXUSERINITDONE |
+	    PCB_KERNNPX);
 	pcb2->pcb_save = &pcb2->pcb_user_save;
 
 	/*


More information about the svn-src-all mailing list