[PATCH v10 2/3] xen/domain: update create_dom0() messages

dmkhn@proton.me posted 3 patches 4 months, 1 week ago
There is a newer version of this series
[PATCH v10 2/3] xen/domain: update create_dom0() messages
Posted by dmkhn@proton.me 4 months, 1 week ago
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>
---
Changes since v9:
- new patch
---
 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 9fa5143eb98c..b59b56636920 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -2080,17 +2080,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 ( alloc_dom0_vcpu0(dom0) == 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 guest OS for %pd (rc = %d)\n", dom0, rc);
 
     set_xs_domain(dom0);
 }
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 7adb92d78a18..28bcfd1861d4 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1080,7 +1080,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");
         }
 
@@ -1095,7 +1095,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
Re: [PATCH v10 2/3] xen/domain: update create_dom0() messages
Posted by Grygorii Strashko 3 months, 2 weeks ago

On 23.06.25 21:28, dmkhn@proton.me wrote:
> 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>
> ---
> Changes since v9:
> - new patch
> ---
>   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 9fa5143eb98c..b59b56636920 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -2080,17 +2080,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));

May be you meant %pd, not d%d?

>   
>       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 ( alloc_dom0_vcpu0(dom0) == 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 guest OS for %pd (rc = %d)\n", dom0, rc);
>   
>       set_xs_domain(dom0);
>   }
> diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
> index 7adb92d78a18..28bcfd1861d4 100644
> --- a/xen/arch/x86/setup.c
> +++ b/xen/arch/x86/setup.c
> @@ -1080,7 +1080,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");
>           }
>   
> @@ -1095,7 +1095,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);

-- 
Best regards,
-grygorii
Re: [PATCH v10 2/3] xen/domain: update create_dom0() messages
Posted by Jan Beulich 3 months, 2 weeks ago
On 17.07.2025 14:58, Grygorii Strashko wrote:
> On 23.06.25 21:28, dmkhn@proton.me wrote:
>> --- a/xen/arch/arm/domain_build.c
>> +++ b/xen/arch/arm/domain_build.c
>> @@ -2080,17 +2080,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));
> 
> May be you meant %pd, not d%d?

Certainly not, as the argument is a number (and dom0 isn't a valid pointer).

Jan
Re: [PATCH v10 2/3] xen/domain: update create_dom0() messages
Posted by Grygorii Strashko 3 months, 2 weeks ago

On 17.07.25 16:03, Jan Beulich wrote:
> On 17.07.2025 14:58, Grygorii Strashko wrote:
>> On 23.06.25 21:28, dmkhn@proton.me wrote:
>>> --- a/xen/arch/arm/domain_build.c
>>> +++ b/xen/arch/arm/domain_build.c
>>> @@ -2080,17 +2080,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));
>>
>> May be you meant %pd, not d%d?
> 
> Certainly not, as the argument is a number (and dom0 isn't a valid pointer).

Right, sorry.

-- 
Best regards,
-grygorii
Re: [PATCH v10 2/3] xen/domain: update create_dom0() messages
Posted by Alejandro Vallejo 3 months, 2 weeks ago
On Mon Jun 23, 2025 at 8:28 PM CEST, dmkhn wrote:
> 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>

nit below. But with or without that change:

  Reviewed-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>

> ---
> Changes since v9:
> - new patch
> ---
>  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 9fa5143eb98c..b59b56636920 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -2080,17 +2080,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 ( alloc_dom0_vcpu0(dom0) == 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 guest OS for %pd (rc = %d)\n", dom0, rc);

nit: s/guest OS for %pd/%pd guest OS/

>  
>      set_xs_domain(dom0);
>  }
> diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
> index 7adb92d78a18..28bcfd1861d4 100644
> --- a/xen/arch/x86/setup.c
> +++ b/xen/arch/x86/setup.c
> @@ -1080,7 +1080,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");
>          }
>  
> @@ -1095,7 +1095,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);
Re: [PATCH v10 2/3] xen/domain: update create_dom0() messages
Posted by dmkhn@proton.me 3 months, 1 week ago
On Thu, Jul 17, 2025 at 12:34:56PM +0200, Alejandro Vallejo wrote:
> On Mon Jun 23, 2025 at 8:28 PM CEST, dmkhn wrote:
> > 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>
> 
> nit below. But with or without that change:
> 
>   Reviewed-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>

Thanks

> 
> > ---
> > Changes since v9:
> > - new patch
> > ---
> >  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 9fa5143eb98c..b59b56636920 100644
> > --- a/xen/arch/arm/domain_build.c
> > +++ b/xen/arch/arm/domain_build.c
> > @@ -2080,17 +2080,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 ( alloc_dom0_vcpu0(dom0) == 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 guest OS for %pd (rc = %d)\n", dom0, rc);
> 
> nit: s/guest OS for %pd/%pd guest OS/

Ack

> 
> >
> >      set_xs_domain(dom0);
> >  }
> > diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
> > index 7adb92d78a18..28bcfd1861d4 100644
> > --- a/xen/arch/x86/setup.c
> > +++ b/xen/arch/x86/setup.c
> > @@ -1080,7 +1080,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");
> >          }
> >
> > @@ -1095,7 +1095,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);
>