From: "Dr. David Alan Gilbert" <dave@treblig.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: BALATON Zoltan <balaton@eik.bme.hu>,
qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: Monitor address printing
Date: Mon, 23 Mar 2026 12:53:40 +0000 [thread overview]
Message-ID: <acE31Ce4LbLafF8K@gallifrey> (raw)
In-Reply-To: <08186662-ad0c-4845-8444-4c3474ab1a23@linaro.org>
* Philippe Mathieu-Daudé (philmd@linaro.org) wrote:
> On 23/3/26 10:35, Philippe Mathieu-Daudé wrote:
> > On 23/3/26 10:00, Philippe Mathieu-Daudé wrote:
> > > On 23/3/26 00:38, BALATON Zoltan wrote:
> > > > Hello,
> > > >
> > > > Noticed that now addresses are printed with a lot of leading
> > > > zeros in monitor:
> > > >
> > > > $ qemu-system-ppc -monitor stdio -S
> > > > QEMU 10.2.90 monitor - type 'help' for more information
> > > > (qemu) x/x 0
> > > > 0000000000000000000000000000000000000000000000000000000000000000:
> > > > 0x00000000
> > > > (qemu) x/x 0xfff00000
> > > > 00000000000000000000000000000000000000000000000000000000fff00000:
> > > > 0x60000000
> > >
> > > Likely commit 6ad593a75a8 ("monitor/hmp: Use plain uint64_t @addr
> > > argument in memory_dump()").
> > >
> >
> > Thanks for the report, I'll post a patch with a fix similar to:
> >
> > -- >8 --
> > diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
> > index bad034937a9..59d49b00f7b 100644
> > --- a/monitor/hmp-cmds.c
> > +++ b/monitor/hmp-cmds.c
> > @@ -537,9 +537,11 @@ static void memory_dump(Monitor *mon, int count,
> > int format, int wsize,
> > uint8_t buf[16];
> > uint64_t v;
> > CPUState *cs = mon_get_cpu(mon);
> > - const unsigned int addr_width = is_physical ? 8 :
> > (target_long_bits() * 2);
> > + const unsigned int addr_width = is_physical ? 8 :
> > (target_long_bits() / 4);
> > const bool big_endian = target_big_endian();
> > ---
>
> Dave had it right during review btw ;)
> https://lore.kernel.org/qemu-devel/aUyC6HNv8KftowlQ@gallifrey/
Haha, only spotted half the confusion!
Dave
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ dave @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
prev parent reply other threads:[~2026-03-23 12:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-22 23:38 Monitor address printing BALATON Zoltan
2026-03-23 2:07 ` Pierrick Bouvier
2026-03-23 5:58 ` Thomas Huth
2026-03-23 9:00 ` Philippe Mathieu-Daudé
2026-03-23 9:35 ` Philippe Mathieu-Daudé
2026-03-23 9:42 ` Philippe Mathieu-Daudé
2026-03-23 12:53 ` Dr. David Alan Gilbert [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=acE31Ce4LbLafF8K@gallifrey \
--to=dave@treblig.org \
--cc=balaton@eik.bme.hu \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.