[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 4/4] xen/arm: Don't blindly print hwdom in generic panic messages


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Mon, 3 Mar 2025 09:56:50 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2/bQ+H7J+bTS7mkQRIITAqEiowFLxZYtUi8lKZ2cQbE=; b=KmElTPAQYnXhUg5ChlEhXuR2Bo0CLiJwiPJK5+grlBj7Hx4yXYUOJLLckl31AOS9qY1jtoLa88QvK6gwVbSUZ/4YNpxi4YTZ0B45hVzdyz+XMD74RVAKLdweEaZmSnmsM4Jw7KYS9Lc8vCqN8TVVwY2NLU7lOTEv/9e4wVLgfQprCU3J7GvV5+ov9ALYOrIglFwll4G3pTf+9kEHLhZFITWxxNq5EFRaYbXtECXHoEASyNfIZpK17Txlc9KvDgO5IH/Ljivmwt5O1GUCxR2T4n7E2T89h1Bjq8Kc0wuPUkZSZwN2tk+C18d8eIFcCL9+LtDSf9q4Vs9fqF4nGhB36Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wvy1xcBad+iO+imkR1o+Pzl9v+7aMTTG1lbT7cOPMiRBgpPhmvWs0/IfgEqba7h4Jzh1Mkv+8xWrLx2le8CdevVaVTh4qEcQK6uG6290TaDYoUqnk1b/G+a63J1o+akdHnMJbzl15DF35b5/smx5L9qeiBydz5Y/sgu4MLf7IpFKmzQWkhsVkwnrftE057i6pZY1NfFXV698dOm2Tp8Q/zjIIU19qCkhFLtS9KUr6rf4pEqd6y6Hak/hKk3aa7JleHcWsP4OwxVpKFX59hyPb3AjmoqSgX3cXiQoQ1PzvPeIZQI48i4kiauQsxZl1Yml8MpTIpxEhiO0Xq79ML2Flg==
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 03 Mar 2025 08:57:07 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

These functions are generic and used not only for hardware domain. This
creates confusion when printing any of these panic messages (e.g.
failure when loading domU kernel would result in informing a user about
a failure in loading hwdom kernel).

Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
 xen/arch/arm/domain_build.c | 4 ++--
 xen/arch/arm/kernel.c       | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index fe05cf6d855f..6531fe019f79 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -2112,12 +2112,12 @@ static void __init initrd_load(struct kernel_info 
*kinfo)
 
     initrd = ioremap_wc(paddr, len);
     if ( !initrd )
-        panic("Unable to map the hwdom initrd\n");
+        panic("Unable to map the %pd initrd\n", kinfo->d);
 
     res = copy_to_guest_phys_flush_dcache(kinfo->d, load_addr,
                                           initrd, len);
     if ( res != 0 )
-        panic("Unable to copy the initrd in the hwdom memory\n");
+        panic("Unable to copy the initrd in the %pd memory\n", kinfo->d);
 
     iounmap(initrd);
 }
diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
index 80fad8b3362c..6eaf9e2b06b3 100644
--- a/xen/arch/arm/kernel.c
+++ b/xen/arch/arm/kernel.c
@@ -150,12 +150,12 @@ static void __init kernel_zimage_load(struct kernel_info 
*info)
 
     kernel = ioremap_wc(paddr, len);
     if ( !kernel )
-        panic("Unable to map the hwdom kernel\n");
+        panic("Unable to map the %pd kernel\n", info->d);
 
     rc = copy_to_guest_phys_flush_dcache(info->d, load_addr,
                                          kernel, len);
     if ( rc != 0 )
-        panic("Unable to copy the kernel in the hwdom memory\n");
+        panic("Unable to copy the kernel in the %pd memory\n", info->d);
 
     iounmap(kernel);
 }
-- 
2.25.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.