From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JkUbL-0004oV-8I for qemu-devel@nongnu.org; Fri, 11 Apr 2008 21:32:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JkUbI-0004oF-PO for qemu-devel@nongnu.org; Fri, 11 Apr 2008 21:32:18 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JkUbI-0004o8-Li for qemu-devel@nongnu.org; Fri, 11 Apr 2008 21:32:16 -0400 Received: from mtaout01-winn.ispmail.ntl.com ([81.103.221.47]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JkUbI-0005UA-9W for qemu-devel@nongnu.org; Fri, 11 Apr 2008 21:32:16 -0400 Received: from aamtaout01-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com with ESMTP id <20080412013508.UGZR13584.mtaout01-winn.ispmail.ntl.com@aamtaout01-winn.ispmail.ntl.com> for ; Sat, 12 Apr 2008 02:35:08 +0100 Received: from miranda.arrow ([213.107.26.151]) by aamtaout01-winn.ispmail.ntl.com with ESMTP id <20080412013610.VOOX219.aamtaout01-winn.ispmail.ntl.com@miranda.arrow> for ; Sat, 12 Apr 2008 02:36:10 +0100 Received: from sdb by miranda.arrow with local (Exim 4.63) (envelope-from ) id 1JkUbB-0008C0-0K for qemu-devel@nongnu.org; Sat, 12 Apr 2008 02:32:09 +0100 Date: Sat, 12 Apr 2008 02:32:08 +0100 From: Stuart Brady Subject: Re: [Qemu-devel] [4195] physical memory dump to file Message-ID: <20080412013208.GA31473@miranda.arrow> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.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