On Tue, Feb 21, 2023, Mingwei Zhang wrote: > From: Aaron Lewis <aaronlewis@xxxxxxxxxx> > > In amx_test, userspace requires that XSAVE is supported before running > the test, then the guest checks that it is supported after enabling > AMX. Remove the redundant check in the guest that XSAVE is supported. It's a bit paranoid, but I actually don't mind the extra check. It's not redundant per se, just useless in its current location. If the check is moved _before_ CR4 is set, then it actually provides value, e.g. if something does go sideways, will fire an assert instead of getting a #GP on set_cr4().