x86/cpuid: leak OSXSAVE only when XSAVE is not clear in policy
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Thu, 27 Jun 2019 19:41:54 +0000 (20:41 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 28 Jun 2019 12:17:53 +0000 (13:17 +0100)
commit902888922e6feda2c485cc4bdeffd0d6e6c26e14
tree607ea81d7f051aa704a1835d3021552ea8f37bf8
parentc097c46a73cb33ef830c572f0824af35fd2327db
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>
xen/arch/x86/cpuid.c