qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Nicholas Piggin" <npiggin@gmail.com>
To: "Richard Henderson" <richard.henderson@linaro.org>,
	<qemu-devel@nongnu.org>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Peter Xu" <peterx@redhat.com>,
	"David Hildenbrand" <david@redhat.com>
Subject: Re: [PATCH 1/2] gdbstub: Add phys_memory_rw_debug for physical memory access
Date: Mon, 17 Mar 2025 14:57:45 +1000	[thread overview]
Message-ID: <D8I9WWLAWDSI.3I9IU38CIU567@gmail.com> (raw)
In-Reply-To: <dfb1025c-830b-4c7e-8d77-b1948fa2c4a3@linaro.org>

On Sat Mar 15, 2025 at 7:19 AM AEST, Richard Henderson wrote:
> On 3/14/25 00:41, Nicholas Piggin wrote:
>> Add an accessor for gdb physical memory access mode which sets the
>> the .debug attribute for the MemTxAttribute, and also returns success
>> to the caller.
>> 
>> GDB with PhyMemMode will now report failure from memory accesses outside
>> valid system memory addresses, and it is also able to write to ROMs as
>> GDB virtual memory access can.
>> 
>> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>> ---
>>   docs/devel/loads-stores.rst | 11 +++++++++++
>>   include/exec/cpu-common.h   |  3 +++
>>   gdbstub/system.c            |  7 +------
>>   system/physmem.c            | 16 ++++++++++++++++
>>   4 files changed, 31 insertions(+), 6 deletions(-)
>> 
>
> I think you might as well put this function in gdbstub/system.c
> and not export (or document) it.

A possible advantage this way is gdbstub not knowing precise
details of the memory transaction (i.e., .debug = 1), but I
can do that. Will submit a v2.

Thanks,
Nick


  reply	other threads:[~2025-03-17  4:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-14  7:41 [PATCH 0/2] gdb invalid memory access handling improvements Nicholas Piggin
2025-03-14  7:41 ` [PATCH 1/2] gdbstub: Add phys_memory_rw_debug for physical memory access Nicholas Piggin
2025-03-14 21:19   ` Richard Henderson
2025-03-17  4:57     ` Nicholas Piggin [this message]
2025-03-14  7:41 ` [PATCH 2/2] memory: suppress INVALID_MEM logs caused by debug access Nicholas Piggin
2025-03-14 15:24   ` Philippe Mathieu-Daudé
2025-03-14 21:22     ` Richard Henderson
2025-03-17  9:03   ` Philippe Mathieu-Daudé
2025-03-17 10:41     ` Nicholas Piggin
2025-03-14 21:57 ` [PATCH 0/2] gdb invalid memory access handling improvements David Hildenbrand

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=D8I9WWLAWDSI.3I9IU38CIU567@gmail.com \
    --to=npiggin@gmail.com \
    --cc=alex.bennee@linaro.org \
    --cc=david@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).