From: Jan Beulich <jbeulich@suse.com>
To: dmkhn@proton.me
Cc: andrew.cooper3@citrix.com, anthony.perard@vates.tech,
julien@xen.org, michal.orzel@amd.com, roger.pau@citrix.com,
sstabellini@kernel.org, dmukhin@ford.com,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v1 4/8] xen/domain: introduce domid_alloc()
Date: Wed, 26 Mar 2025 14:56:24 +0100 [thread overview]
Message-ID: <141c8421-77fb-45fa-a892-94713c74113d@suse.com> (raw)
In-Reply-To: <20250318233617.849903-5-dmukhin@ford.com>
On 19.03.2025 00:36, dmkhn@proton.me 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
next prev parent reply other threads:[~2025-03-26 13:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 23:36 [PATCH v1 0/8] xen/console: cleanup console input switch logic dmkhn
2025-03-18 23:36 ` [PATCH v1 1/8] xen/console: fix trailing whitespaces dmkhn
2025-03-19 9:45 ` Jan Beulich
2025-03-18 23:36 ` [PATCH v1 2/8] xen/console: introduce console input permission dmkhn
2025-03-26 13:44 ` Jan Beulich
2025-03-29 0:03 ` Denis Mukhin
2025-03-18 23:36 ` [PATCH v1 3/8] xen/domain: introduce domid_top dmkhn
2025-03-26 13:52 ` Jan Beulich
2025-03-18 23:36 ` [PATCH v1 4/8] xen/domain: introduce domid_alloc() dmkhn
2025-03-26 13:56 ` Jan Beulich [this message]
2025-03-18 23:36 ` [PATCH v1 5/8] xen/console: rename switch_serial_input() to console_switch_focus() dmkhn
2025-03-26 13:58 ` Jan Beulich
2025-03-18 23:36 ` [PATCH v1 6/8] xen/console: rename console_rx to console_focus dmkhn
2025-03-26 14:00 ` Jan Beulich
2025-03-18 23:37 ` [PATCH v1 7/8] xen/console: introduce console_set_focus() dmkhn
2025-03-19 19:53 ` Denis Mukhin
2025-03-26 14:28 ` Jan Beulich
2025-03-26 14:32 ` Jan Beulich
2025-03-18 23:37 ` [PATCH v1 8/8] xen/console: introduce console_get_focus() dmkhn
2025-03-19 19:52 ` [PATCH v1 0/8] xen/console: cleanup console input switch logic Denis Mukhin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=141c8421-77fb-45fa-a892-94713c74113d@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=dmkhn@proton.me \
--cc=dmukhin@ford.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.