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

Re: [PATCH] xen/arm: Print memory size in decimal in construct_domU


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Ayan Kumar Halder <ayankuma@xxxxxxx>
  • Date: Tue, 3 Jan 2023 09:21:33 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; 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=7qkI29jLQQRBYRidEwFXmAcmunYaTX4OpV8a84XMPHA=; b=BqqAfsyEMXTP/CABtrHwV5l0aYPGaBDwebePedHap8DFQHHtm+TKh5xJ6sfSKpHbDQ/TfxAIPmBZy4645Eeur0OPb0E87eHSF5s1HCZukb4ndm2OA1TzaEE0VMcC/mF3nPnbgniz40OVtQZUzmdcl7m1eH8BtSKJgiZt64zOPDnInFS33akbTp+Bj7oTcxpYn7wLUeNG06ZbKqV2n4cCSqtiMMLkMGaIObpKpo8vr6UirX7YGUn/T+C9GbRFUyrTZej/3JqnMGIP+7PVOcacPlWfJJH2sZ8SOA8TvFUCzO9bvLZZZBwM8h5OvFTYXyhzg55cvMU8Sdci7PcuR1mGIQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L57P4pEsXqa97kttUkByOOOjc/CDl82noJeBFXsgziCBWwbh9BOXZduzWcgBZ+xjMzVSfsU6GWD3p1od5MiW6AmrleEkd3b4SI9y8s2rJCLb/FPVjMs6aJnpEoqnz9B0Y9NSJdJuaThDiQB6pNRdtN8fSgZCyNiprBK4rxhLYJF/YEIrxbky4U0Yx7xHYAKli7YjFw/K/wMDAvcshizyKw5DvuRKC4ndDzuKNEfR7AFPI5zuQtwTKCmtXRZD7RXroWDeXxSYxSTj/olS4E4SrP3Wm0ahBRodY78uQ4KaB9rXURY7AmLbtN18XX2ihSrc9bEkjTUp4ZagraymAf+qJg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Delivery-date: Tue, 03 Jan 2023 09:22:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Michal,

On 02/01/2023 14:49, Michal Orzel wrote:
Printing domain's memory size in hex without even prepending it
with 0x is not very useful and can be misleading. Switch to decimal
notation.

Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
  xen/arch/arm/domain_build.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 829cea8de84f..7e204372368c 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -3774,7 +3774,7 @@ static int __init construct_domU(struct domain *d,
      if ( rc != 0 )
          return rc;
- printk("*** LOADING DOMU cpus=%u memory=%"PRIx64"KB ***\n", d->max_vcpus, mem);
+    printk("*** LOADING DOMU cpus=%u memory=%"PRIu64"KB ***\n", d->max_vcpus, 
mem);

I will prefer it to be printed in hex format with 0x prefixed. The reason being the mem is obtained from device-tree domU's 'memory' prop where the values are in hex.

It will help the user to debug easily without requiring the the person to manually calculate the hex equivalent and then trying to correlate it with what is written in dts.

- Ayan

kinfo.vpl011 = dt_property_read_bool(node, "vpl011");



 


Rackspace

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