x86/CPUID: correct error indicator for max extended leaf
PATCH 1/1 x86/CPUID: correct error indicator for max extended leaf
With the max base leaf using 0, this one should be using the extended leaf counterpart thereof, rather than some arbitrary extended leaf.
Fixes 588a966a572e ("libx86: Introduce x86_cpu_policies_are_compatible()")
Signed-off-by Jan Beulich <[email protected]>
tools/tests/cpu-policy/test-cpu-policy.c +1 -1
@@ -570,7 +570,7 @@ static void test_is_compatible_failure(v { .name = "Host extd.max_leaf out of range", .guest_cpuid.extd.max_leaf = 1, - .e = { 0x80000008, -1, -1 }, + .e = { 0x80000000, -1, -1 }, }, { .name = "Host no CPUID faulting, Guest wanted",
xen/lib/x86/policy.c +1 -1
@@ -19,7 +19,7 @@ int x86_cpu_policies_are_compatible(consFAIL_CPUID (0 ,NA );if ( guest->cpuid->extd.max_leaf > host->cpuid->extd.max_leaf ) -FAIL_CPUID (0x80000008 ,NA ); +FAIL_CPUID (0x80000000 ,NA );/* TODO: Audit more CPUID data. */
Quoted 5 lines · Jan Beulich
With the max base leaf using 0, this one should be using the extended leaf counterpart thereof, rather than some arbitrary extended leaf.
Fixes 588a966a572e ("libx86: Introduce x86_cpu_policies_are_compatible()")Signed-off-by Jan Beulich <[email protected]>
Reviewed-by Andrew Cooper <[email protected]>