Skip to contentSkip to conversation

xen/arm: domain_build: Print the correct domain in dtb_load()

PATCH In review Julien Grall 4 participants 6 messages Aug 15, 2019 – Oct 16, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 xen/arm: domain_build: Print the correct domain in dtb_load()

dtb_load() can be called by other domain than dom0. To avoid confusion in the log, print the correct domain.

---
Changes in v2:
- Fix the second print in the function as well.

---
 xen/arch/arm/domain_build.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
xen/arch/arm/domain_build.c +5 -3
index 4e51e22927..126374f603 100644
@@ -1787,15 +1787,17 @@ static void __init dtb_load(struct kernel_info *kinfo)
 {
     unsigned long left;
 
-    printk("Loading dom0 DTB to 0x%"PRIpaddr"-0x%"PRIpaddr"\n",
-           kinfo->dtb_paddr, kinfo->dtb_paddr + fdt_totalsize(kinfo->fdt));
+    printk("Loading %pd DTB to 0x%"PRIpaddr"-0x%"PRIpaddr"\n",
+           kinfo->d, kinfo->dtb_paddr,
+           kinfo->dtb_paddr + fdt_totalsize(kinfo->fdt));
 
     left = copy_to_guest_phys_flush_dcache(kinfo->d, kinfo->dtb_paddr,
                                            kinfo->fdt,
                                            fdt_totalsize(kinfo->fdt));
 
     if ( left != 0 )
-        panic("Unable to copy the DTB to dom0 memory (left = %lu bytes)\n", left);
+        panic("Unable to copy the DTB to %pd memory (left = %lu bytes)\n",
+              kinfo->d, left);
     xfree(kinfo->fdt);
 }
 
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v2 1/1
#1 lore raw
Quoted 4 lines · Julien Grall

dtb_load() can be called by other domain than dom0. To avoid confusion in the log, print the correct domain.

Quoted 32 lines

---
Changes in v2:
- Fix the second print in the function as well.

---
 xen/arch/arm/domain_build.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
xen/arch/arm/domain_build.c +5 -3
index 4e51e22927..126374f603 100644
@@ -1787,15 +1787,17 @@ static void __init dtb_load(struct kernel_info *kinfo)
 {
     unsigned long left;
 
-    printk("Loading dom0 DTB to 0x%"PRIpaddr"-0x%"PRIpaddr"\n",
-           kinfo->dtb_paddr, kinfo->dtb_paddr + fdt_totalsize(kinfo->fdt));
+    printk("Loading %pd DTB to 0x%"PRIpaddr"-0x%"PRIpaddr"\n",
+           kinfo->d, kinfo->dtb_paddr,
+           kinfo->dtb_paddr + fdt_totalsize(kinfo->fdt));
 
     left = copy_to_guest_phys_flush_dcache(kinfo->d, kinfo->dtb_paddr,
                                            kinfo->fdt,
                                            fdt_totalsize(kinfo->fdt));
 
     if ( left != 0 )
-        panic("Unable to copy the DTB to dom0 memory (left = %lu bytes)\n", left);
+        panic("Unable to copy the DTB to %pd memory (left = %lu bytes)\n",
+              kinfo->d, left);
     xfree(kinfo->fdt);
 }
Signature · 5 lines
Volodymyr Babchuk at EPAM
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v2 1/1
#2 lore raw
In reply to Julien Grall
Quoted 4 lines · Julien Grall

dtb_load() can be called by other domain than dom0. To avoid confusion in the log, print the correct domain.

Quoted 35 lines

---
Changes in v2:
- Fix the second print in the function as well.

---
 xen/arch/arm/domain_build.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
xen/arch/arm/domain_build.c +5 -3
index 4e51e22927..126374f603 100644
@@ -1787,15 +1787,17 @@ static void __init dtb_load(struct kernel_info *kinfo)
 {
     unsigned long left;
 
-    printk("Loading dom0 DTB to 0x%"PRIpaddr"-0x%"PRIpaddr"\n",
-           kinfo->dtb_paddr, kinfo->dtb_paddr + fdt_totalsize(kinfo->fdt));
+    printk("Loading %pd DTB to 0x%"PRIpaddr"-0x%"PRIpaddr"\n",
+           kinfo->d, kinfo->dtb_paddr,
+           kinfo->dtb_paddr + fdt_totalsize(kinfo->fdt));
 
     left = copy_to_guest_phys_flush_dcache(kinfo->d, kinfo->dtb_paddr,
                                            kinfo->fdt,
                                            fdt_totalsize(kinfo->fdt));
 
     if ( left != 0 )
-        panic("Unable to copy the DTB to dom0 memory (left = %lu bytes)\n", left);
+        panic("Unable to copy the DTB to %pd memory (left = %lu bytes)\n",
+              kinfo->d, left);
     xfree(kinfo->fdt);
 }
 
Signature · 1 line
2.11.0

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw
In reply to Julien Grall

Hi,

Hmm, it looks like I forgot this patch before the freeze. Juergen, are you happy with this to go in Xen 4.13?

Cheers,

Quoted 38 lines · Julien Grall

dtb_load() can be called by other domain than dom0. To avoid confusion in the log, print the correct domain.

---
Changes in v2:
- Fix the second print in the function as well.

---
  xen/arch/arm/domain_build.c | 8 +++++---
  1 file changed, 5 insertions(+), 3 deletions(-)
xen/arch/arm/domain_build.c +5 -3
index 4e51e22927..126374f603 100644
@@ -1787,15 +1787,17 @@ static void __init dtb_load(struct kernel_info *kinfo)
  {
      unsigned long left;
 
-    printk("Loading dom0 DTB to 0x%"PRIpaddr"-0x%"PRIpaddr"\n",
-           kinfo->dtb_paddr, kinfo->dtb_paddr + fdt_totalsize(kinfo->fdt));
+    printk("Loading %pd DTB to 0x%"PRIpaddr"-0x%"PRIpaddr"\n",
+           kinfo->d, kinfo->dtb_paddr,
+           kinfo->dtb_paddr + fdt_totalsize(kinfo->fdt));
 
      left = copy_to_guest_phys_flush_dcache(kinfo->d, kinfo->dtb_paddr,
                                             kinfo->fdt,
                                             fdt_totalsize(kinfo->fdt));
 
      if ( left != 0 )
-        panic("Unable to copy the DTB to dom0 memory (left = %lu bytes)\n", left);
+        panic("Unable to copy the DTB to %pd memory (left = %lu bytes)\n",
+              kinfo->d, left);
      xfree(kinfo->fdt);
  }
 
Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#4 lore raw

Hi Juergen,

Gentle ping.

Cheers,

Quoted 46 lines · Julien Grall

Hi,

Hmm, it looks like I forgot this patch before the freeze. Juergen, are you happy with this to go in Xen 4.13?

Cheers,

Quoted 38 lines · Julien Grall

dtb_load() can be called by other domain than dom0. To avoid confusion in the log, print the correct domain.

---
     Changes in v2:
         - Fix the second print in the function as well.
---
  xen/arch/arm/domain_build.c | 8 +++++---

  1 file changed, 5 insertions(+), 3 deletions(-)
xen/arch/arm/domain_build.c +5 -3
index 4e51e22927..126374f603 100644
@@ -1787,15 +1787,17 @@ static void __init dtb_load(struct kernel_info 
 *kinfo)
   {
       unsigned long left;
-    printk("Loading dom0 DTB to 0x%"PRIpaddr"-0x%"PRIpaddr"\n",
-           kinfo->dtb_paddr, kinfo->dtb_paddr + 
 fdt_totalsize(kinfo->fdt));
+    printk("Loading %pd DTB to 0x%"PRIpaddr"-0x%"PRIpaddr"\n",
+           kinfo->d, kinfo->dtb_paddr,
+           kinfo->dtb_paddr + fdt_totalsize(kinfo->fdt));
       left = copy_to_guest_phys_flush_dcache(kinfo->d, kinfo->dtb_paddr,
                                              kinfo->fdt,
                                              fdt_totalsize(kinfo->fdt));
       if ( left != 0 )
-        panic("Unable to copy the DTB to dom0 memory (left = %lu 
 bytes)\n", left);
+        panic("Unable to copy the DTB to %pd memory (left = %lu 
 bytes)\n",
+              kinfo->d, left);
       xfree(kinfo->fdt);
   }
Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#5 lore raw
Quoted 18 lines · Julien Grall

Hi Juergen,

Gentle ping.

Cheers,

Quoted 11 lines · Julien Grall

Hi,

Hmm, it looks like I forgot this patch before the freeze. Juergen, are you happy with this to go in Xen 4.13?

Cheers,

Quoted 4 lines · Julien Grall

dtb_load() can be called by other domain than dom0. To avoid confusion in the log, print the correct domain.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel