|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v7 01/10] lib/x86: Bump max basic leaf in {pv,hvm}_max_policy
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@xxxxxxxxx>
---
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(+)
diff --git a/xen/arch/x86/cpu-policy.c b/xen/arch/x86/cpu-policy.c
index b6d9fad56773..715a66d2a978 100644
--- a/xen/arch/x86/cpu-policy.c
+++ b/xen/arch/x86/cpu-policy.c
@@ -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() ?
--
2.47.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |