Skip to content

x86: workaround inability to fully restore FPU state

David Vrabel xen-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 1 replyIn review
  2. v33 patches 13 repliesSuperseded
  3. v23 patches 16 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC5 patches17 repliesSuperseded

Changes in v4 from the cover letter

- Skip FIP check if FP state isn't being saved.
- Move controversial patch to the end.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3x86/fpu: Add a per-domain field to set the width of FIP/FDPxen/arch/x86/domain.c xen/arch/x86/i387.c xen/arch/x86/xstate.c +1 more+57 -191 reply
2/3x86/hvm: add HVM_PARAM_X87_FIP_WIDTHtools/libxc/xc_sr_save_x86_hvm.c xen/arch/x86/hvm/hvm.c xen/include/public/hvm/params.h+37 -10 replies
3/3x86/fpu: improve check for XSAVE* not writing FIP/FDP fieldsxen/arch/x86/xstate.c+17 -300 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchAndrew CooperWei LiuJan Beulich
1/3R-b
2/3R-b A-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCHv4 0/3] x86: workaround inability to fully restore FPU state

This series extends the workaround for the inability for some x86 CPUs to fully restore the FPU exception state (64-bit FIP/FDP and FCS/FDS).

Toolstack (or the guest) may override the default behaviour to always do a 32-bit save/restore.

Running Microsoft's Driver Verifier continues to work in a 32-bit Windows guest and (if HVM_PARAM_X87_FIP_WIDTH is set to 4) now works in a 64-bit Windows guest.

Changes in v4:

- Skip FIP check if FP state isn't being saved.
- Move controversial patch to the end.

Changes in v3:

- Use a random value to poison FIP when checking if the hardware writes it.
- Skip checking for FIP updates if 8 is always requested.
- Only update word size if FP state was requested.
- Improve comments a bit.

Changes in v2:

- Improve xsave()'s detection of whether the hardware updated FIP/FDP.
- Leave 64-bit PV guests in auto mode.
- Don't automatically set FIP width for Windows guests -- it's safer to leave auto-mode on and leave it up to the admin to enable the mode when running Driver Verifier.
- Use a HVM param to change the default.

David

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel