From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeWbt-00043i-NG for qemu-devel@nongnu.org; Mon, 20 May 2013 16:23:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UeWbo-0004tv-S2 for qemu-devel@nongnu.org; Mon, 20 May 2013 16:23:09 -0400 Received: from cantor2.suse.de ([195.135.220.15]:59038 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeWbo-0004r8-Il for qemu-devel@nongnu.org; Mon, 20 May 2013 16:23:04 -0400 Message-ID: <519A8620.5020506@suse.de> Date: Mon, 20 May 2013 22:22:56 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1368821513-56919-1-git-send-email-jfrei@linux.vnet.ibm.com> In-Reply-To: <1368821513-56919-1-git-send-email-jfrei@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] Split out dump-guest-memory memory mapping code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jens Freimann Cc: Christian Borntraeger , Ekaterina Tumanova , qemu-devel Am 17.05.2013 22:11, schrieb Jens Freimann: > From: Ekaterina Tumanova >=20 > Split out dump-guest-memory memory mapping code to allow dumping withou= t=20 > memory mapping >=20 > The qemu dump.c code currently requires CONFIG_HAVE_CORE_DUMP as well a= s > CONFIG_HAVE_GET_MEMORY_MAPPING. This allows for dumping with and withou= t paging. > Some architectures will provide only the non-paging case. This patch al= lows an > architecture to provide dumping even when CONFIG_HAVE_GET_MEMORY_MAPPIN= G is not > available. To do that, we split out the common code and provide stub fu= nctions > for the non-paging case. If -p is specified on a target that doesn't su= pport it, > we will pass an error to the calling code. >=20 > Signed-off-by: Ekaterina Tumanova > Signed-off-by: Jens Freimann >=20 > --- > v1->v2: > - use error_setg instead of introducing new QERR constant Thanks, applied to qom-cpu (with commit message redundancy reduced and one change below): https://github.com/afaerber/qemu-cpu/commits/qom-cpu > --- >=20 > Makefile.target | 2 +- > dump.c | 10 +++- > include/sysemu/memory_mapping.h | 10 ++++ > memory_mapping-stub.c | 11 +---- > memory_mapping.c | 84 +------------------------------- > memory_mapping_common.c | 103 ++++++++++++++++++++++++++++++++= ++++++++ > 6 files changed, 127 insertions(+), 93 deletions(-) > create mode 100644 memory_mapping_common.c [...] > diff --git a/dump.c b/dump.c > index c0d3da5..68526e5 100644 > --- a/dump.c > +++ b/dump.c [...] > @@ -826,6 +829,11 @@ void qmp_dump_guest_memory(bool paging, const char= *file, bool has_begin, > DumpState *s; > int ret; > =20 > + if (paging && !memory_mapping_allowed()) { > + error_setg(errp, "Option paging is not supported for curre= nt architecture"); > + return; Fixed the indentation and broke the line to stay within 80 chars. > + } > + > if (has_begin && !has_length) { > error_set(errp, QERR_MISSING_PARAMETER, "length"); > return; [snip] Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg