zfs/module/zcommon
Attila Fülöp 3b52ccd7d7 Linux 5.16 compat: don't use XSTATE_XSAVE to save FPU state
Linux 5.16 moved XSTATE_XSAVE and XSTATE_XRESTORE out of our reach,
so add our own XSAVE{,OPT,S} code and use it for Linux 5.16.

Please note that this differs from previous behavior in that it
won't handle exceptions created by XSAVE an XRSTOR. This is sensible
for three reasons.

 - Exceptions during XSAVE and XRSTOR can only occur if the feature
   is not supported or enabled or the memory operand isn't aligned
   on a 64 byte boundary. If this happens something else went
   terribly wrong, and it may be better to stop execution.

 - Previously we just printed a warning and didn't handle the fault,
   this is arguable for the above reason.

 - All other *SAVE instruction also don't handle exceptions, so this
   at least aligns behavior.

Finally add a test to catch such a regression in the future.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Attila Fülöp <attila@fueloep.org>
Closes #13042
Closes #13059
2022-02-16 17:58:55 -08:00
..
Makefile.in Linux 5.10 compat: use iov_iter in uio structure 2020-12-18 08:48:26 -08:00
cityhash.c Compile cityhash code into libzfs 2020-03-27 09:11:22 -07:00
zfeature_common.c Add missing checks for unsupported features 2021-02-27 17:16:02 -08:00
zfs_comutil.c Fix various typos 2021-04-07 13:27:11 -07:00
zfs_deleg.c Remove code for zfs remap 2019-06-24 16:44:01 -07:00
zfs_fletcher.c FreeBSD: Implement sysctl for fletcher4 impl 2020-12-11 10:29:01 -08:00
zfs_fletcher_aarch64_neon.c OpenZFS restructuring - move platform specific headers 2019-09-05 09:34:54 -07:00
zfs_fletcher_avx512.c Fix AVX512BW Fletcher code on AVX512-but-not-BW machines 2021-05-10 12:05:36 -07:00
zfs_fletcher_intel.c OpenZFS restructuring - move platform specific headers 2019-09-05 09:34:54 -07:00
zfs_fletcher_sse.c OpenZFS restructuring - move platform specific headers 2019-09-05 09:34:54 -07:00
zfs_fletcher_superscalar.c Refactor ccompile.h to not include system headers 2020-07-25 20:09:50 -07:00
zfs_fletcher_superscalar4.c Refactor ccompile.h to not include system headers 2020-07-25 20:09:50 -07:00
zfs_namecheck.c Allow pool names that look like Solaris disk names 2021-04-07 13:24:46 -07:00
zfs_prop.c Linux 5.16 compat: don't use XSTATE_XSAVE to save FPU state 2022-02-16 17:58:55 -08:00
zpool_prop.c Add "compatibility" property for zpool feature sets 2021-02-17 21:30:45 -08:00
zprop_common.c Left-align index props 2020-01-31 08:55:51 -08:00