mirror_zfs/include/os/linux/kernel/linux
Attila Fülöp 8e94ac0e36
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-09 12:50:10 -08:00
..
blkdev_compat.h Linux 5.16 compat: linux/elevator.h 2021-11-09 11:26:35 -08:00
compiler_compat.h Use fallthrough macro 2021-09-14 10:17:54 -06:00
dcache_compat.h Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kmap_compat.h Removing old code for k(un)map_atomic 2021-03-19 22:38:44 -07:00
Makefile.am Avoid installing kernel headers on FreeBSD 2020-06-27 17:40:14 -07:00
mod_compat.h Replace *CTASSERT() with _Static_assert() 2022-01-26 11:38:52 -08:00
page_compat.h Linux 5.9 compat: NR_SLAB_RECLAIMABLE 2020-08-29 20:57:45 -07:00
percpu_compat.h Use percpu_counter for obj_alloc counter of Linux-backed caches 2020-06-26 18:06:50 -07:00
simd_aarch64.h Linux 4.14, 4.19, 5.0+ compat: SIMD save/restore 2019-10-24 10:17:33 -07:00
simd_powerpc.h Add AltiVec RAID-Z 2020-01-23 11:01:24 -08:00
simd_x86.h Linux 5.16 compat: don't use XSTATE_XSAVE to save FPU state 2022-02-09 12:50:10 -08:00
simd.h Add AltiVec RAID-Z 2020-01-23 11:01:24 -08:00
utsname_compat.h OpenZFS restructuring - move platform specific headers 2019-09-05 09:34:54 -07:00
vfs_compat.h Linux 5.12 compat: idmapped mounts 2021-03-19 21:00:59 -07:00
xattr_compat.h Linux 5.12 compat: idmapped mounts 2021-03-19 21:00:59 -07:00