FPU Tag Word reset to wrong value #904
Copy link
Copy link
Closed
Labels
lifecycle/confirmedBug is verified or proposal seems reasonableBug is verified or proposal seems reasonable
Milestone
Description
We currently use pub(crate) const FP_TAG_WORD_DEFAULT: u8 = 0xff; // each 8 of x87 fpu registers is empty which is incorrect (at least for kvm), which uses abridged format (FXSAVE, not FSAVE), so we should set this to 0x00 to indicate empty, instead of 0xff.
See:
https://docs.kernel.org/virt/kvm/api.html#kvm-get-fpu
https://www.felixcloutier.com/x86/fxsave
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
lifecycle/confirmedBug is verified or proposal seems reasonableBug is verified or proposal seems reasonable
Activity
jsturtevant commentedon Sep 23, 2025
The confusion comes from the docs in AMD64 Architecture Programmer’s Manual Volume 1
6.2.4 x87 Tag Word Register (FTW)where Empty is11==emptyBut in the fxsave docs undersection AMD64 Architecture Programmer’s Manual Volume 2
11.5.10.1 FXSAVE Format for x87 Tag Word:ludfjig commentedon Dec 16, 2025
Closed by #924