On 21.10.2024 17:46, Alejandro Vallejo wrote:
> Expose sensible topologies in leaf 0xb. At the moment it synthesises
> non-HT systems, in line with the previous code intent.
>
> Leaf 0xb in the host policy is no longer zapped and the guest {max,def}
> policies have their topology leaves zapped instead. The intent is for
> toolstack to populate them. There's no current use for the topology
> information in the host policy, but it makes no harm.
How does this (and hence ...
> @@ -619,6 +616,9 @@ static void __init calculate_pv_max_policy(void)
> recalculate_xstate(p);
>
> p->extd.raw[0xa] = EMPTY_LEAF; /* No SVM for PV guests. */
> +
> + /* Wipe host topology. Populated by toolstack */
> + memset(p->topo.raw, 0, sizeof(p->topo.raw));
> }
>
> static void __init calculate_pv_def_policy(void)
> @@ -785,6 +785,9 @@ static void __init calculate_hvm_max_policy(void)
>
> /* It's always possible to emulate CPUID faulting for HVM guests */
> p->platform_info.cpuid_faulting = true;
> +
> + /* Wipe host topology. Populated by toolstack */
> + memset(p->topo.raw, 0, sizeof(p->topo.raw));
> }
... these, at least comment-wise) fit with Dom0 also needing some data
there?
Also nit: Multi-sentence comments want full stops after every sentence.
Jan