qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH-for-5.0] gdbstub: Use correct address space with Qqemu.PhyMemMode packet
@ 2020-03-30 15:30 Philippe Mathieu-Daudé
  2020-03-30 16:08 ` Peter Maydell
  0 siblings, 1 reply; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-30 15:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: Edgar E . Iglesias, Peter Maydell, Jon Doron, Alex Bennée,
	Philippe Mathieu-Daudé, Alistair Francis,
	Philippe Mathieu-Daudé, Luc Michel

Since commit 3f940dc98, we added support for vAttach packet
to select a particular thread/cpu/core. However when using
the GDB physical memory mode, it is not clear which CPU
address space is used.
Since the CPU address space is stored in CPUState::as, use
address_space_rw() instead of cpu_physical_memory_rw().

Fixes: ab4752ec8d9
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 gdbstub.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/gdbstub.c b/gdbstub.c
index 013fb1ac0f..3baaef50e3 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -69,11 +69,8 @@ static inline int target_memory_rw_debug(CPUState *cpu, target_ulong addr,
 
 #ifndef CONFIG_USER_ONLY
     if (phy_memory_mode) {
-        if (is_write) {
-            cpu_physical_memory_write(addr, buf, len);
-        } else {
-            cpu_physical_memory_read(addr, buf, len);
-        }
+        address_space_rw(cpu->as, addr, MEMTXATTRS_UNSPECIFIED,
+                         buf, len, is_write);
         return 0;
     }
 #endif
-- 
2.21.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-06-01 10:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-30 15:30 [PATCH-for-5.0] gdbstub: Use correct address space with Qqemu.PhyMemMode packet Philippe Mathieu-Daudé
2020-03-30 16:08 ` Peter Maydell
2020-03-30 16:21   ` Philippe Mathieu-Daudé
2020-03-30 16:41     ` Peter Maydell
2020-05-31 15:27       ` Philippe Mathieu-Daudé
2020-05-31 16:42         ` Jon Doron
2020-05-31 16:57           ` Peter Maydell
2020-06-01  7:29             ` Jon Doron
2020-06-01 10:39               ` Alex Bennée
2020-06-01 10:41                 ` Jon Doron

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).