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

[for-4.17] xen/arm: domain_build: Do not use dprintk unconditionally


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Fri, 16 Sep 2022 09:19:20 +0200
  • 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
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=bYLwhphNxjPniBivxpg6SChjQHPi6Sajt8Scuh1Scvc=; b=HLyY97+MIGXBYpbTf3yrrfQRRrw3d5woLKM4oRMfDGGK9ILWUUINrNsxKxc2nUvIlbGxj0FpDDoY6j2axo+0GDGw1wKkxhzyK5s6By5fsCELCjaMuyYBgebvAcJI3BHVGEjkuIsNZNg8h+2L2YTG68UdOTAt0DePKuD4wNf+svCbzx0vELekIMrlMM0AIPxITApbgkTdPXsXLJN6Zo+UaRrIG/oFeYSN7lelr7Js/W956Aw0VvRdDxFTvIPrJllZrt1iFXszZnDxOiDlW36PY0jqjBlMtG7J0oPVKgcbsoYxAd+GjVNWlZ9Y56SLhS+9+QRD6DCRzbs0XMF0z9rWDQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ae6mqHZ1OaZnbTRYxcaRiCnSyH+5gleKA/iQPEkRFpnrPC3JcX6YMDXe4wcLfZCBjlKkJxoNkZlvTGezBHqJuTQUyo/at/42gy66YYHutcx6UtTLgYVERnrcIgeI8maIbP3msECwFjynCeHP754II2CrBXYbhb567NrV2SNsDhcmgXxlD3CPYv+ZqFHdPJ5Tn4QtsSOpDZ7bO+gifX9pM0/gN/Nj7I+u8l1EgbXVck7QIymc6Pf4M9qwLykZKqkA4CSqYVs2cpOxI4eT9uxoosuvvfiYGbZp2RXzsN/xGhoSU9v3Kv6y2MS9H8Myph9EscIIt4mLfTNV8iOPaQM2oA==
  • 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: Fri, 16 Sep 2022 07:19:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Using dprintk results in printing additionally file name and line
number. This is something we do not want when printing regular
information unconditionally as it looks like as if there was some issue.
It also makes the logging inconsistent.

Fix this by switching to printk because this information may also be
helpful on the release builds (it would still require setting loglvl to
"info" or lower level).

Fixes: 5597f32f409c ("xen/arm: assign static shared memory to the default owner 
dom_io")
Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
Rationale for taking this patch for 4.17:
Current code results in an abnormal behavior [1] and was introduced by
the 4.17 feature (static shared memory). Even though it can only be seen
on a debug build, it should be fixed now so that we have a consistent
behavior across all the logs.

[1]:
(XEN) arch/arm/domain_build.c:847: d0: allocate static shared memory BANK 
0x00000070000000-0x00000080000000.
---
 xen/arch/arm/domain_build.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 01c2aaccd82d..f47e77876a25 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -844,9 +844,9 @@ 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(XENLOG_INFO
+           "%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




 


Rackspace

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