Skip to contentSkip to conversation

xen/arm: domain_build: Always print the static shared memory region

PATCH In review Michal Orzel 3 participants 3 messages Sep 19, 2022 – Sep 29, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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.

---
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(-)
xen/arch/arm/domain_build.c +2 -3
index 01c2aaccd82d..40e3c2e1195c 100644
@@ -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) )
Signature · 1 line
2.25.1
#1 lore raw

Hi Michal,

Quoted 19 lines

-----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.

---
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.

Quoted 2 lines

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

Sorry for the late response.

Kind regards,
Henry

Quoted 7 lines

Changes in v2:
- use different argumentation
- drop XENLOG_INFO

---
 xen/arch/arm/domain_build.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Acked-by on v2 1/1
#2 lore raw
In reply to Michal Orzel
Quoted 7 lines · Michal Orzel

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.

Quoted 37 lines

---
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(-)
xen/arch/arm/domain_build.c +2 -3
index 01c2aaccd82d..40e3c2e1195c 100644
@@ -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) )
Signature · 1 line
2.25.1