x86/xstate: Make errors in xstate calculations more obvious by crashing the domain
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 18 Jul 2018 11:22:55 +0000 (12:22 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 19 Jul 2018 18:57:26 +0000 (19:57 +0100)
commitd6371ccb93012db4ad6615fe666205b86308cb4e
treebb2b863a19f8842be659b7750b403ee086010484
parent361b835fa00d9f45167c50a60e054ccf22c065d7
x86/xstate: Make errors in xstate calculations more obvious by crashing the domain

If xcr0_max exceeds xfeature_mask, then something is broken with the CPUID
policy derivation or auditing logic.  If hardware rejects new_bv, then
something is broken with Xen's xstate logic.

In both cases, crash the domain with an obvious error message, to help
highlight the issues.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/xstate.c