On 17.07.2025 19:58, Alejandro Vallejo wrote: > Later patches will keep refactoring create_dom0() > until it can create arbitrary domains. This is one > small step in that direction. > > Signed-off-by: Alejandro Vallejo <alejandro.garciavall...@amd.com>
As with the other patch - we first need to settle on principles. And then ... > --- a/xen/arch/x86/setup.c > +++ b/xen/arch/x86/setup.c > @@ -1054,7 +1054,8 @@ static struct domain *__init create_dom0(struct > boot_info *bi) > if ( IS_ERR(d) ) > panic("Error creating d%u: %ld\n", bd->domid, PTR_ERR(d)); > > - init_dom0_cpuid_policy(d); > + if ( pv_shim || d->cdf & (CDF_privileged | CDF_hardware) ) > + init_dom0_cpuid_policy(d); ... we also want to avoid confusing naming (i.e. the "dom0" in here). Finally, nit: The & expression wants parenthesizing against the ||. Jan