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

Michal Orzel posted 1 patch 1 year, 7 months ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20220919183737.14067-1-michal.orzel@amd.com
xen/arch/arm/domain_build.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
[for-4.17 v2] xen/arm: domain_build: Always print the static shared memory region
Posted by Michal Orzel 1 year, 7 months ago
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(-)

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
Re: [for-4.17 v2] xen/arm: domain_build: Always print the static shared memory region
Posted by Stefano Stabellini 1 year, 7 months ago
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
>
RE: [for-4.17 v2] xen/arm: domain_build: Always print the static shared memory region
Posted by Henry Wang 1 year, 7 months ago
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(-)