diff options
| author | Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> | 2026-06-09 17:07:29 +0200 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> | 2026-06-18 14:27:04 +0200 |
| commit | cb30b8758d4214c87729da4855518289509675e5 (patch) | |
| tree | 1134d7c7ead3c6648b31a83b54c72286d44f09e9 /dump | |
| parent | 736641b66072ae1477dd8e47793efad64686d3cf (diff) | |
| download | qemu-cb30b8758d4214c87729da4855518289509675e5.tar.gz qemu-cb30b8758d4214c87729da4855518289509675e5.zip | |
system: Move cpu_physical_memory_*() declarations to 'system/physmem.h'
The following cpu_physical_memory_*() methods do not involve any
vCPU but only access physical memory:
- cpu_physical_memory_read()
- cpu_physical_memory_write()
- cpu_physical_memory_map()
- cpu_physical_memory_unmap()
Rename them removing the 'cpu_' prefix, and move then to the
"system/physmem.h" header with the other methods involved in
global physical address space.
Mechanical change using sed, then adding missing headers manually.
No logical change intended.
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20260616020839.19104-7-philmd@oss.qualcomm.com>
Diffstat (limited to 'dump')
| -rw-r--r-- | dump/dump.c | 3 | ||||
| -rw-r--r-- | dump/win_dump-x86.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/dump/dump.c b/dump/dump.c index 1f216e74f5..eb2ee1c10d 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -21,6 +21,7 @@ #include "system/dump.h" #include "system/runstate.h" #include "system/cpus.h" +#include "system/physmem.h" #include "qapi/error.h" #include "qapi/qapi-commands-dump.h" #include "qapi/qapi-events-dump.h" @@ -1892,7 +1893,7 @@ static void dump_init(DumpState *s, int fd, bool has_format, warn_report("guest note format is unsupported: %" PRIu16, guest_format); } else { s->guest_note = g_malloc(size + 1); /* +1 for adding \0 */ - cpu_physical_memory_read(addr, s->guest_note, size); + physical_memory_read(addr, s->guest_note, size); get_note_sizes(s, s->guest_note, NULL, &name_size, &desc_size); s->guest_note_size = ELF_NOTE_SIZE(note_head_size, name_size, diff --git a/dump/win_dump-x86.c b/dump/win_dump-x86.c index d893dea7f1..8848c8bfca 100644 --- a/dump/win_dump-x86.c +++ b/dump/win_dump-x86.c @@ -10,6 +10,7 @@ #include "qemu/osdep.h" #include "system/dump.h" +#include "system/physmem.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "exec/cpu-defs.h" @@ -55,7 +56,7 @@ static size_t write_run(uint64_t base_page, uint64_t page_count, while (size) { len = size; - buf = cpu_physical_memory_map(addr, &len, false); + buf = physical_memory_map(addr, &len, false); if (!buf) { error_setg(errp, "win-dump: failed to map physical range" " 0x%016" PRIx64 "-0x%016" PRIx64, addr, addr + size - 1); @@ -64,7 +65,7 @@ static size_t write_run(uint64_t base_page, uint64_t page_count, l = qemu_write_full(fd, buf, len); eno = errno; - cpu_physical_memory_unmap(buf, addr, false, len); + physical_memory_unmap(buf, addr, false, len); if (l != len) { error_setg_errno(errp, eno, "win-dump: failed to save memory"); return 0; |
