To incrementally convert create_dom0() into being a generalized domain construction function, move the dom0 specific cpuid policy behind the control domain capability.
Signed-off-by: Daniel P. Smith <dpsm...@apertussolutions.com> --- xen/arch/x86/setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 8ba9d592ed5a..41e46f05a520 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1050,7 +1050,8 @@ static struct domain *__init create_dom0(struct boot_info *bi) bd->d = d; - init_dom0_cpuid_policy(d); + if ( bd->capabilities & BUILD_CAPS_CONTROL ) + init_dom0_cpuid_policy(bd->d); if ( alloc_dom_vcpu0(bd) == NULL ) panic("Error creating %pd vcpu 0\n", d); -- 2.30.2