From 23bb5f1a112bb0a3cd4bec57b5b9d7a6b0726cae Mon Sep 17 00:00:00 2001 From: Michal Orzel Date: Mon, 3 Mar 2025 09:56:50 +0100 Subject: [PATCH] xen/arm: Don't blindly print hwdom in generic panic messages 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 Reviewed-by: Bertrand Marquis --- 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 fea1382d49..d4570bc0b4 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -2117,12 +2117,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 80fad8b336..6eaf9e2b06 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.39.5