[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [4195] physical memory dump to file
From: |
Stuart Brady |
Subject: |
Re: [Qemu-devel] [4195] physical memory dump to file |
Date: |
Sat, 12 Apr 2008 02:32:08 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hi,
I've not tested this, but wouldn't something like this be needed?
Index: monitor.c
===================================================================
--- monitor.c (revision 4196)
+++ monitor.c (working copy)
@@ -750,7 +750,7 @@ static void do_physical_memory_save(unsi
FILE *f;
uint32_t l;
uint8_t buf[1024];
- target_long addr = GET_TLONG(valh, vall);
+ target_phys_addr_t addr = GET_TPHYSADDR(valh, vall);
f = fopen(filename, "wb");
if (!f) {
Also, it might be worth trying to merge do_physical_memory_save() and
do_memory_save(), although I'm not sure of the correct type for addr.
memory_dump() uses target_phys_addr_t for both physical and virtual
addresses, which it can obviously get away with, but I'm not sure
whether sizeof(target_phys_addr_t) >= sizeof(target_long) will always
be a safe assumption.
Cheers,
--
Stuart Brady