diff mbox series

[for-4.17,v2] xen/arm: domain_build: Always print the static shared memory region

Message ID 20220919183737.14067-1-michal.orzel@amd.com (mailing list archive)
State Accepted
Headers show
Series [for-4.17,v2] xen/arm: domain_build: Always print the static shared memory region | expand

Commit Message

Michal Orzel Sept. 19, 2022, 6:37 p.m. UTC
At the moment, the information about allocating static shared memory
region is only printed during the debug build. This information can also
be helpful for the end user (which may not be the same as the person
building the package), so switch to printk(). Also drop XENLOG_INFO to be
consistent with other printk() used to print the domain information.

Signed-off-by: Michal Orzel <michal.orzel@amd.com>
---
The other motivation for this patch is to be consistent with regards
to the format of the informative logs. We do not really use dprintk with
XENLOG_INFO unconditionally as it results in printing additionally filename
and line number which may be misleading for someone reading the boot log.
Such extra information is helpful on error conditions to make the process
of debugging easier.

Rationale for taking this patch for 4.17:
Useful information printed always instead of only during the debug build.

Changes in v2:
- use different argumentation
- drop XENLOG_INFO
---
 xen/arch/arm/domain_build.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Henry Wang Sept. 27, 2022, 7:38 a.m. UTC | #1
Hi Michal,

> -----Original Message-----
> Subject: [for-4.17 v2] xen/arm: domain_build: Always print the static shared
> memory region
> 
> At the moment, the information about allocating static shared memory
> region is only printed during the debug build. This information can also
> be helpful for the end user (which may not be the same as the person
> building the package), so switch to printk(). Also drop XENLOG_INFO to be
> consistent with other printk() used to print the domain information.
> 
> Signed-off-by: Michal Orzel <michal.orzel@amd.com>
> ---
> The other motivation for this patch is to be consistent with regards
> to the format of the informative logs. We do not really use dprintk with
> XENLOG_INFO unconditionally as it results in printing additionally filename
> and line number which may be misleading for someone reading the boot log.
> Such extra information is helpful on error conditions to make the process
> of debugging easier.
> 
> Rationale for taking this patch for 4.17:
> Useful information printed always instead of only during the debug build.

Sorry for the late response.

Release-acked-by: Henry Wang <Henry.Wang@arm.com>

Kind regards,
Henry

> 
> Changes in v2:
> - use different argumentation
> - drop XENLOG_INFO
> ---
>  xen/arch/arm/domain_build.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
Stefano Stabellini Sept. 29, 2022, 3:53 p.m. UTC | #2
On Mon, 19 Sep 2022, Michal Orzel wrote:
> At the moment, the information about allocating static shared memory
> region is only printed during the debug build. This information can also
> be helpful for the end user (which may not be the same as the person
> building the package), so switch to printk(). Also drop XENLOG_INFO to be
> consistent with other printk() used to print the domain information.
> 
> Signed-off-by: Michal Orzel <michal.orzel@amd.com>

Acked-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
> The other motivation for this patch is to be consistent with regards
> to the format of the informative logs. We do not really use dprintk with
> XENLOG_INFO unconditionally as it results in printing additionally filename
> and line number which may be misleading for someone reading the boot log.
> Such extra information is helpful on error conditions to make the process
> of debugging easier.
> 
> Rationale for taking this patch for 4.17:
> Useful information printed always instead of only during the debug build.
> 
> Changes in v2:
> - use different argumentation
> - drop XENLOG_INFO
> ---
>  xen/arch/arm/domain_build.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index 01c2aaccd82d..40e3c2e1195c 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -844,9 +844,8 @@ static int __init assign_shared_memory(struct domain *d,
>      unsigned long nr_pages, nr_borrowers, i;
>      struct page_info *page;
>  
> -    dprintk(XENLOG_INFO,
> -            "%pd: allocate static shared memory BANK %#"PRIpaddr"-%#"PRIpaddr".\n",
> -            d, pbase, pbase + psize);
> +    printk("%pd: allocate static shared memory BANK %#"PRIpaddr"-%#"PRIpaddr".\n",
> +           d, pbase, pbase + psize);
>  
>      smfn = acquire_shared_memory_bank(d, pbase, psize);
>      if ( mfn_eq(smfn, INVALID_MFN) )
> -- 
> 2.25.1
>
diff mbox series

Patch

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 01c2aaccd82d..40e3c2e1195c 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -844,9 +844,8 @@  static int __init assign_shared_memory(struct domain *d,
     unsigned long nr_pages, nr_borrowers, i;
     struct page_info *page;
 
-    dprintk(XENLOG_INFO,
-            "%pd: allocate static shared memory BANK %#"PRIpaddr"-%#"PRIpaddr".\n",
-            d, pbase, pbase + psize);
+    printk("%pd: allocate static shared memory BANK %#"PRIpaddr"-%#"PRIpaddr".\n",
+           d, pbase, pbase + psize);
 
     smfn = acquire_shared_memory_bank(d, pbase, psize);
     if ( mfn_eq(smfn, INVALID_MFN) )