https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247945
John Baldwin <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #5 from John Baldwin <[email protected]> --- This may be a bug in the arm64 fpu interface? Note that the kthread calls fpu_kern_thread() first thing before it's done any work at all. Ah, I think I see the bug. cpu_copy_thread() in vm_machdep.c just blindly copies pcb_flags which means that if the first kthread runs before another one is forked, the newly forked thread will bogusly have PCB_FP_KERN set in pcb_flags. The amd64 version is careful to do this in cpu_copy_thread: clear_pcb_flags(pcb2, PCB_FPUINITDONE | PCB_USERFPUINITDONE | PCB_KERNFPU); cpu_fork() for amd64 does an fpuexit() before copying the pcb which effectively does the same thing. On arm64, cpu_fork() calls vfp_save_state which does not clear any pcb_flags after doing vfp_store/vfp_disable. It also doesn't check pcb_flags to determine if it should store/disable which is probably wrong. cpu_copy_thread() just needs to clear the relevant flags in the new pcb I think. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "[email protected]"
