qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stuart Brady <sdbrady@ntlworld.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [4195] physical memory dump to file
Date: Sat, 12 Apr 2008 02:32:08 +0100	[thread overview]
Message-ID: <20080412013208.GA31473@miranda.arrow> (raw)
In-Reply-To: <E1JkQus-0002ZW-Di@cvs.savannah.gnu.org>

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

      reply	other threads:[~2008-04-12  1:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-11 21:36 [Qemu-devel] [4195] physical memory dump to file Aurelien Jarno
2008-04-12  1:32 ` Stuart Brady [this message]

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=20080412013208.GA31473@miranda.arrow \
    --to=sdbrady@ntlworld.com \
    --cc=qemu-devel@nongnu.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).