All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH v2 1/7] monitor/hmp: Replace target_ulong -> vaddr in hmp_gva2gpa()
Date: Mon, 12 Jan 2026 07:33:54 +0100	[thread overview]
Message-ID: <87h5sribl9.fsf@pond.sub.org> (raw)
In-Reply-To: <f904ee62-3cc2-4657-bb09-71e933df9092@linaro.org> (Richard Henderson's message of "Sun, 11 Jan 2026 11:07:52 +1100")

Richard Henderson <richard.henderson@linaro.org> writes:

> On 1/8/26 18:30, Markus Armbruster wrote:
>> Philippe Mathieu-Daudé <philmd@linaro.org> writes:
>> 
>>> cpu_get_phys_page_debug() takes a vaddr type since commit
>>> 00b941e581b ("cpu: Turn cpu_get_phys_page_debug() into a CPUClass
>>> hook").
>>>
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>> Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
>>> Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
>>> ---
>>>   monitor/hmp-cmds-target.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/monitor/hmp-cmds-target.c b/monitor/hmp-cmds-target.c
>>> index e9820611466..2976f986d35 100644
>>> --- a/monitor/hmp-cmds-target.c
>>> +++ b/monitor/hmp-cmds-target.c
>>> @@ -301,7 +301,7 @@ void hmp_gpa2hva(Monitor *mon, const QDict *qdict)
>>>   
>>>   void hmp_gva2gpa(Monitor *mon, const QDict *qdict)
>>>   {
>>> -    target_ulong addr = qdict_get_int(qdict, "addr");
>>> +    vaddr addr = qdict_get_int(qdict, "addr");
>>>       CPUState *cs = mon_get_cpu(mon);
>>>       hwaddr gpa;
>> 
>>         if (!cs) {
>>             monitor_printf(mon, "No cpu\n");
>>             return;
>>         }
>> 
>>         gpa  = cpu_get_phys_page_debug(cs, addr & TARGET_PAGE_MASK);
>>         if (gpa == -1) {
>>             monitor_printf(mon, "Unmapped\n");
>>         } else {
>>             monitor_printf(mon, "gpa: 0x%" HWADDR_PRIx "\n",
>>                            gpa + (addr & ~TARGET_PAGE_MASK));
>> 
>> Pardon my ignorant question: is HWADDR_PRIx appropriate for vaddr?
>
> The print argument is gpa + offset, and hpa is hwaddr.

So, hwaddr must be at least as wide as vaddr?



  reply	other threads:[~2026-01-12  6:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-29 23:15 [PATCH v2 0/7] monitor: Merge hmp-cmds-target.c within hmp-cmds.c Philippe Mathieu-Daudé
2025-12-29 23:15 ` [PATCH v2 1/7] monitor/hmp: Replace target_ulong -> vaddr in hmp_gva2gpa() Philippe Mathieu-Daudé
2026-01-08  7:30   ` Markus Armbruster
2026-01-11  0:07     ` Richard Henderson
2026-01-12  6:33       ` Markus Armbruster [this message]
2026-01-12 21:26         ` Richard Henderson
2025-12-29 23:15 ` [PATCH v2 2/7] monitor/hmp: Make memory_dump() @is_physical argument a boolean Philippe Mathieu-Daudé
2025-12-29 23:48   ` Dr. David Alan Gilbert
2025-12-30  6:20   ` Manos Pitsidianakis
2025-12-29 23:15 ` [PATCH v2 3/7] monitor/hmp: Use plain uint64_t @addr argument in memory_dump() Philippe Mathieu-Daudé
2025-12-29 23:15 ` [PATCH v2 4/7] monitor/hmp: Remove target_long uses " Philippe Mathieu-Daudé
2025-12-29 23:15 ` [PATCH v2 5/7] monitor/hmp: Inline ld[uw, l, q]_p() calls " Philippe Mathieu-Daudé
2025-12-29 23:15 ` [PATCH v2 6/7] monitor/hmp: Fix coding style in hmp-cmds-target.c Philippe Mathieu-Daudé
2025-12-29 23:15 ` [PATCH v2 7/7] monitor/hmp: Merge hmp-cmds-target.c within hmp-cmds.c Philippe Mathieu-Daudé
2025-12-30 18:15 ` [PATCH v2 0/7] monitor: " Philippe Mathieu-Daudé

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=87h5sribl9.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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.