-
-
Notifications
You must be signed in to change notification settings - Fork 606
Closed
Description
This issue was created due to a thought experiment - I don't have evidence that it leads to an actual bug.
When OSv code runs in the middle of some user code, e.g., interrupt handling, we use fpu_lock() to save the user code's FPU state so we can restore it later. However, after the kernel saves the FPU state, it doesn't attempt to clear it. The kernel, which needs to do FPU calculations (e.g., in the scheduler), might inherit weird control bits or a full FPU stack, and misbehave.
I think maybe after saving the FPU state, we should run the FNINIT instruction, or our fpu_init() function (which also resets the sse control register).
Metadata
Metadata
Assignees
Labels
No labels