[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] mm: Unify PRI_gfn and PRI_mfn macros
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Frediano Ziglio <frediano.ziglio@xxxxxxxxx>
- Date: Mon, 9 Sep 2024 14:29:55 +0100
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Mon, 09 Sep 2024 13:30:16 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 09.09.2024 15:14, Frediano Ziglio wrote:
> @@ -4334,7 +4334,7 @@ static void gnttab_usage_print(struct domain *rd)
> first = 0;
>
> /* [0xXXX] ddddd 0xXXXXX 0xXXXXXXXX ddddd 0xXXXXXX 0xXX */
> - printk("[0x%03x] %5d 0x%"PRI_mfn" 0x%08x %5d 0x%06"PRIx64" 0x%02x\n",
> + printk("[0x%03x] %5d %"PRI_mfn" 0x%08x %5d 0x%06"PRIx64" 0x%02x\n",
> ref, act->domid, mfn_x(act->mfn), act->pin,
> sha->domid, frame, status);
Sadly this is where things break: The columnar view will no longer be retained
even on systems with memory only below 4Gb. I have to admit I'm not sure in how
far we can deem this acceptable.
Jan
I suppose this line is more the exception to the rule. One option would be to define the macros to just take care of the type and base (like standards like PRIx64) and specify all in the strings (so having "%#"PRI_mfn or "0x%05"PRI_mfn). Or define 2 macros, one for default format (I would go for PRI_mfn) and another for raw format (like PRIx_mfn).
Frediano
|