]> xenbits.xensource.com Git - people/royger/xen.git/commit
x86/CPUID: shrink max_{,sub}leaf fields according to actual leaf contents
authorJan Beulich <jbeulich@suse.com>
Thu, 22 Apr 2021 12:39:24 +0000 (14:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 22 Apr 2021 12:39:24 +0000 (14:39 +0200)
commit540d911c2813c3d8f4cdbb3f5672119e5e768a3d
treed6690deaf225714a1434a608eb3e7bb5af694436
parentfe6cbbf163ec852d823379ab481c62044f92ea75
x86/CPUID: shrink max_{,sub}leaf fields according to actual leaf contents

Zapping leaf data for out of range leaves is just one half of it: To
avoid guests (bogusly or worse) inferring information from mere leaf
presence, also shrink maximum indicators such that the respective
trailing entry is not all blank (unless of course it's the initial
subleaf of a leaf that's not the final one).

This is also in preparation of bumping the maximum basic leaf we
support, to ensure guests not getting exposed related features won't
observe a change in behavior.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
tools/tests/cpu-policy/test-cpu-policy.c
xen/arch/x86/cpuid.c
xen/arch/x86/traps.c
xen/include/public/arch-x86/cpuid.h
xen/include/xen/lib/x86/cpuid.h
xen/lib/x86/cpuid.c