|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v1 4/8] xen/domain: introduce domid_alloc()
On 19.03.2025 00:36, dmkhn@xxxxxxxxx wrote:
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -2367,8 +2367,15 @@ void __init create_dom0(void)
> .grant_opts = XEN_DOMCTL_GRANT_version(opt_gnttab_max_version),
> };
> unsigned int flags = CDF_privileged;
> + domid_t domid;
> int rc;
>
> + rc = domid_alloc(get_initial_domain_id());
> + if ( rc < 0 )
> + panic("Cannot use domain ID %d (rc = %d)\n",
> + get_initial_domain_id(), rc);
> + domid = rc;
> +
> /* The vGIC for DOM0 is exactly emulating the hardware GIC */
> dom0_cfg.arch.gic_version = XEN_DOMCTL_CONFIG_GIC_NATIVE;
> dom0_cfg.arch.nr_spis = VGIC_DEF_NR_SPIS;
> @@ -2391,19 +2398,21 @@ void __init create_dom0(void)
> if ( !llc_coloring_enabled )
> flags |= CDF_directmap;
>
> - dom0 = domain_create(0, &dom0_cfg, flags);
> + dom0 = domain_create(domid, &dom0_cfg, flags);
> if ( IS_ERR(dom0) )
> - panic("Error creating domain 0 (rc = %ld)\n", PTR_ERR(dom0));
> + panic("Error creating domain %d (rc = %ld)\n", domid, PTR_ERR(dom0));
>
> if ( llc_coloring_enabled && (rc = dom0_set_llc_colors(dom0)) )
> - panic("Error initializing LLC coloring for domain 0 (rc = %d)\n",
> rc);
> + panic("Error initializing LLC coloring for domain %d (rc = %d)\n",
> + domid, rc);
>
> if ( alloc_dom0_vcpu0(dom0) == NULL )
> - panic("Error creating domain 0 vcpu0\n");
> + panic("Error creating domain %d vcpu0\n", domid);
>
> rc = construct_dom0(dom0);
> if ( rc )
> - panic("Could not set up DOM0 guest OS (rc = %d)\n", rc);
> + panic("Could not set up guest OS for domain %d (rc = %d)\n",
> + domid, rc);
> }
Assuming we really needed this new function, why would there be an Arm side
change to Dom0 creation, but no equivalent change on the x86 side?
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |