From: Denis Mukhin <dmukhin@ford.com>
Use %pd for domain identification in error/panic messages in create_dom0().
No functional change.
Signed-off-by: Denis Mukhin <dmukhin@ford.com>
Reviewed-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
---
Changed since v10:
- corrected messages in create_dom0()
- added Alejandro's R-b
---
xen/arch/arm/domain_build.c | 8 ++++----
xen/arch/x86/setup.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 789f2b9d3ce7..9422b5e1827b 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -2081,17 +2081,17 @@ void __init create_dom0(void)
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 d%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 %pd (rc = %d)\n", dom0, rc);
if ( vcpu_create(dom0, 0) == NULL )
- panic("Error creating domain 0 vcpu0\n");
+ panic("Error creating %pdv0\n", dom0);
rc = construct_dom0(dom0);
if ( rc )
- panic("Could not set up DOM0 guest OS (rc = %d)\n", rc);
+ panic("Could not set up %pd guest OS (rc = %d)\n", dom0, rc);
set_xs_domain(dom0);
}
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 2ff7c28c277b..a740c6f60c63 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1084,7 +1084,7 @@ static struct domain *__init create_dom0(struct boot_info *bi)
if ( (strlen(acpi_param) == 0) && acpi_disabled )
{
- printk("ACPI is disabled, notifying Domain 0 (acpi=off)\n");
+ printk("ACPI is disabled, notifying %pd (acpi=off)\n", d);
safe_strcpy(acpi_param, "off");
}
@@ -1099,7 +1099,7 @@ static struct domain *__init create_dom0(struct boot_info *bi)
bd->d = d;
if ( construct_dom0(bd) != 0 )
- panic("Could not construct domain 0\n");
+ panic("Could not construct %pd\n", d);
bd->cmdline = NULL;
xfree(cmdline);
--
2.34.1
On 28.07.2025 20:34, dmkhn@proton.me wrote:
> From: Denis Mukhin <dmukhin@ford.com>
>
> Use %pd for domain identification in error/panic messages in create_dom0().
Except that ...
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -2081,17 +2081,17 @@ void __init create_dom0(void)
>
> 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 d%d (rc = %ld)\n", domid, PTR_ERR(dom0));
... here you don't (and can't). To avoid people wondering when they later
come across a commit, I think descriptions would better be accurate. It'll
be Arm maintainers to judge whether they let you get away with this; as it
covers x86 only anyway:
Acked-by: Jan Beulich <jbeulich@suse.com>
Jan
On Tue, Jul 29, 2025 at 10:11:31AM +0200, Jan Beulich wrote:
> On 28.07.2025 20:34, dmkhn@proton.me wrote:
> > From: Denis Mukhin <dmukhin@ford.com>
> >
> > Use %pd for domain identification in error/panic messages in create_dom0().
>
> Except that ...
>
> > --- a/xen/arch/arm/domain_build.c
> > +++ b/xen/arch/arm/domain_build.c
> > @@ -2081,17 +2081,17 @@ void __init create_dom0(void)
> >
> > 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 d%d (rc = %ld)\n", domid, PTR_ERR(dom0));
>
> ... here you don't (and can't). To avoid people wondering when they later
Thanks for catching this! Will update.
> come across a commit, I think descriptions would better be accurate. It'll
> be Arm maintainers to judge whether they let you get away with this; as it
> covers x86 only anyway:
> Acked-by: Jan Beulich <jbeulich@suse.com>
Thanks!
>
> Jan
© 2016 - 2025 Red Hat, Inc.