]> xenbits.xensource.com Git - xen.git/commit
x86/cpuid: Move all xstate leaf handling into guest_cpuid()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 16 Dec 2016 16:21:20 +0000 (16:21 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 18 Jan 2017 14:32:30 +0000 (14:32 +0000)
commitdd86adba79476aa9a294f335b5ff2ba9378e4976
treea459ae49e169620aa978f648ecf866f50507ef8c
parentaf109224109abb9648ea9720505daeeb06f76e4b
x86/cpuid: Move all xstate leaf handling into guest_cpuid()

The xstate union now contains sanitised values, so it can be handled fully in
the non-legacy path.

c/s 1c0bc709d "x86/cpuid: Perform max_leaf calculations in guest_cpuid()"
accidentally introduced a boundary error for the subleaf check, although it
was masked by the correct logic in the legacy path.

Two dynamic adjustments need making, but a TODO and BUILD_BUG_ON() are left to
cover a latent bug which will present itself when Xen starts supporting XSS
states for guests.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpuid.c
xen/arch/x86/domctl.c
xen/include/asm-x86/processor.h