Re: [PATCH v3 05/13] KVM: selftests: x86: Add check of CR0.TS in the #NM handler in amx_test

From: Sean Christopherson
Date: Fri Mar 24 2023 - 16:38:38 EST


On Tue, Feb 21, 2023, Mingwei Zhang wrote:
> Add check of CR0.TS[bit 3] before the check of IA32_XFD_ERR in the #NM
> handler in amx_test. This is because XFD may not be the only reason of
> the IA32_XFD MSR and the bitmap corresponding to the state components
> required by the faulting instruction." (Intel SDM vol 1. Section 13.14)
>
> Add the missing check of CR0.TS.

The check is not missing. CR0.TS is never set in selftests, i.e. this is pure
paranoia. I've no objection to adding the paranoid check, but it should not presented
as a "flaw" in the existing code.