x86/cpuid: leak OSXSAVE only when XSAVE is not clear in policy
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Fri, 5 Jul 2019 08:33:27 +0000 (10:33 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 5 Jul 2019 08:33:27 +0000 (10:33 +0200)
commitc14026bd193a57a76251abae48817c862198d5b7
treeb27b84c40663f0bc6e2def94fdde80d4d2db353d
parentc719519a4183d0630121f6abeba420f49dbc3229
x86/cpuid: leak OSXSAVE only when XSAVE is not clear in policy

This fixes booting of old non-PV-OPS kernels which historically
looked for OSXSAVE instead of XSAVE bit in CPUID to check whether
XSAVE feature is enabled. If such a guest appears to be started on
an XSAVE enabled CPU and the feature is explicitly cleared in
policy, leaked OSXSAVE bit from Xen will lead to guest crash early in
boot.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 902888922e6feda2c485cc4bdeffd0d6e6c26e14
master date: 2019-06-28 13:17:53 +0100
xen/arch/x86/cpuid.c