From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBhAt-0003VR-Fk for qemu-devel@nongnu.org; Tue, 20 Aug 2013 04:20:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBhAb-0004sV-Ha for qemu-devel@nongnu.org; Tue, 20 Aug 2013 04:20:23 -0400 Received: from e28smtp06.in.ibm.com ([122.248.162.6]:37712) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBhAa-0004l7-Mr for qemu-devel@nongnu.org; Tue, 20 Aug 2013 04:20:05 -0400 Received: from /spool/local by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 20 Aug 2013 13:40:23 +0530 From: "Aneesh Kumar K.V" In-Reply-To: <52121951.80407@suse.de> References: <1376915356-31011-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <52121951.80407@suse.de> Date: Tue, 20 Aug 2013 13:49:45 +0530 Message-ID: <874naklqou.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 0/3] target-ppc: Add support for dumping guest memory using qemu gdb server List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?utf-8?Q?F=C3=A4rber?= Cc: Alexey Kardashevskiy , qemu-ppc@nongnu.org, Alexander Graf , qemu-devel@nongnu.org Andreas F=C3=A4rber writes: > Hi Aneesh, > > Am 19.08.2013 14:29, schrieb Aneesh Kumar K.V: >> This patch series implement support for dumping guest memory using qemu = gdb server. > > I had a quick look through but will leave in-depth review to Alex or > Anthony. > > Do you plan to implement dumping guest memory via QMP, too? Are you looking at memsave command ? That would fail before. This patch series should fix that too. For memsave to fail we need the below patch diff --git a/cpus.c b/cpus.c index 0f65e76..3340150 100644 --- a/cpus.c +++ b/cpus.c @@ -1309,7 +1309,10 @@ void qmp_memsave(int64_t addr, int64_t size, const c= har *filename, l =3D sizeof(buf); if (l > size) l =3D size; - cpu_memory_rw_debug(cpu, addr, buf, l, 0); + if (cpu_memory_rw_debug(cpu, addr, buf, l, 0) !=3D 0) { + error_set(errp, QERR_IO_ERROR); + goto exit; + } if (fwrite(buf, 1, l, f) !=3D l) { error_set(errp, QERR_IO_ERROR); goto exit;