Page MenuHomeFreeBSD

Fix for mis-interpretation of PCB_KERNFPU.
Needs ReviewPublic

Authored by kib on Mon, Jun 29, 10:18 PM.

Details

Reviewers
jhb
Summary

RIght now PCB_KERNFPU is used both as indication that kernel prepared hardware FPU context to use and that the thread is fpu-kern thread. This also breaks fpu_kern_enter(FPU_KERN_NOCTX), since fpu_kern_leave() then clears PCB_KERNFPU.

Introduce new flag PCB_KERNFPU_THR which indicates that the thread is fpu-kern. Do not clear PCB_KERNFPU if fpu-kern thread leaves noctx fpu region.

Reported by: jhb

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 32047

Event Timeline

kib created this revision.Mon, Jun 29, 10:18 PM
kib requested review of this revision.Mon, Jun 29, 10:18 PM
andrew added a subscriber: andrew.Tue, Jun 30, 8:13 AM

Do we need a similar change in arm64 and i386?

kib added a comment.Tue, Jun 30, 9:11 AM

Do we need a similar change in arm64 and i386?

For arm64 yes. For i386 there is no NOCTX.
But lets first confirm that it fixes reported issue without new regressions.