]> xenbits.xensource.com Git - people/royger/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, 20 Feb 2017 10:38:14 +0000 (10:38 +0000)
commit1a3bf3b45e65e69975ae15d0e5cd3cad906bf61c
tree8db1a661af2a85ef05251e3198ad83c5c559dd3a
parent3293bf75888268b2bd3c4bd13cc0cf834364aacb
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>
---
CC: Jan Beulich <JBeulich@suse.com>
xen/arch/x86/cpuid.c
xen/arch/x86/domctl.c
xen/include/asm-x86/cpuid.h