]> xenbits.xensource.com Git - xen.git/commit
x86/cpuid: Handle leaf 0x4 in guest_cpuid()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 17 Feb 2017 17:21:35 +0000 (17:21 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 13 Mar 2017 13:44:39 +0000 (13:44 +0000)
commit0b4249e96b458d92bc8f2bade41bf16b468618fb
treed326b5798bf7d9a52252207a40d2402ab61ced8c
parent9dc1e0cd81ee469d638d1962a92d9b4bd2972bfa
x86/cpuid: Handle leaf 0x4 in guest_cpuid()

Leaf 0x4 is reserved by AMD.  For Intel, it is a multi-invocation leaf with
ecx enumerating different cache details.

Add a new union for it in struct cpuid_policy, collect it from hardware in
calculate_raw_policy(), audit it in recalculate_cpuid_policy() and update
guest_cpuid() and update_domain_cpuid_info() to properly insert/extract data.

A lot of the data here will need further auditing/refinement when better
topology support is introduced, but for now, this matches the existing
toolstack behaviour.

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/cpuid.h