@@ -585,6 +585,9 @@ static void __init calculate_pv_max_policy(void)
*/
p->feat.max_subleaf = ARRAY_SIZE(p->feat.raw) - 1;
+ /* Toolstack may populate leaves not present in the basic host leaves */
+ p->basic.max_leaf = ARRAY_SIZE(p->basic.raw) - 1;
+
x86_cpu_policy_to_featureset(p, fs);
for ( i = 0; i < ARRAY_SIZE(fs); ++i )
@@ -672,6 +675,9 @@ static void __init calculate_hvm_max_policy(void)
*/
p->feat.max_subleaf = ARRAY_SIZE(p->feat.raw) - 1;
+ /* Toolstack may populate leaves not present in the basic host leaves */
+ p->basic.max_leaf = ARRAY_SIZE(p->basic.raw) - 1;
+
x86_cpu_policy_to_featureset(p, fs);
mask = hvm_hap_supported() ?
Bump it to ARRAY_SIZE() so toolstack is able to extend a policy past host limits (i.e: to emulate a feature not present in the host) Signed-off-by: Alejandro Vallejo <alejandro.vallejo@cloud.com> --- v7: * Replaces v6/patch1("Relax checks about policy compatibility") * Bumps basic.max_leaf to ARRAY_SIZE(basic.raw) to pass the compatibility checks rather than tweaking the checker. --- xen/arch/x86/cpu-policy.c | 6 ++++++ 1 file changed, 6 insertions(+)