]> xenbits.xensource.com Git - xen.git/commit
x86/cpu: undo BIOS CPUID max_leaf limit before querying for features
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 12 Aug 2014 14:10:01 +0000 (16:10 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 12 Aug 2014 14:10:01 +0000 (16:10 +0200)
commit35e7ae5f66f34bd93dff089587da3b3665622eff
tree67fdd3a1fad5c39f1b4750d849269fb4acf6087f
parent6fbd99d7cc46a91566839e85bffb9bff406adbae
x86/cpu: undo BIOS CPUID max_leaf limit before querying for features

If IA32_MISC_ENABLE[22] is set by the BIOS, CPUID.0.EAX will be limited to 3.
Lift this limit before considering whether to query CPUID.7[ECX=0].EBX for
features.

Without this change, dom0 is able to see this feature leaf (as the limit was
subsequently lifted), and will set features appropriately in HVM domain cpuid
policies.

The specific bug XenServer observed was the advertisement of the FSGSBASE
feature, but an inability to set CR4.FSGSBASE as Xen considered the bit to be
reserved as cpu_has_fsgsbase incorrectly evaluated as false.

This is a regression introduced by c/s 44e24f8567 "x86: don't call
generic_identify() redundantly" where the redundant call actually resampled
CPUID.7[ECX=0] properly to obtain the feature flags.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: a1ac4cf52e38386bac7ac3440c7da0099662ca5c
master date: 2014-07-29 17:02:25 +0200
xen/arch/x86/cpu/common.c