qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Jens Freimann <jfrei@linux.vnet.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
	Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v2] Split out dump-guest-memory memory mapping code
Date: Mon, 20 May 2013 22:22:56 +0200	[thread overview]
Message-ID: <519A8620.5020506@suse.de> (raw)
In-Reply-To: <1368821513-56919-1-git-send-email-jfrei@linux.vnet.ibm.com>

Am 17.05.2013 22:11, schrieb Jens Freimann:
> From: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>
> 
> Split out dump-guest-memory memory mapping code to allow dumping without 
> memory mapping
> 
> The qemu dump.c code currently requires CONFIG_HAVE_CORE_DUMP as well as
> CONFIG_HAVE_GET_MEMORY_MAPPING. This allows for dumping with and without paging.
> Some architectures will provide only the non-paging case. This patch allows an
> architecture to provide dumping even when CONFIG_HAVE_GET_MEMORY_MAPPING is not
> available. To do that, we split out the common code and provide stub functions
> for the non-paging case. If -p is specified on a target that doesn't support it,
> we will pass an error to the calling code.
> 
> Signed-off-by: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>
> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
> 
> ---
> 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

> ---
> 
>  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;
>  
> +    if (paging && !memory_mapping_allowed()) {
> +            error_setg(errp, "Option paging is not supported for current 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

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

      reply	other threads:[~2013-05-20 20:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-17 20:11 [Qemu-devel] [PATCH v2] Split out dump-guest-memory memory mapping code Jens Freimann
2013-05-20 20:22 ` Andreas Färber [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=519A8620.5020506@suse.de \
    --to=afaerber@suse.de \
    --cc=borntraeger@de.ibm.com \
    --cc=jfrei@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=tumanova@linux.vnet.ibm.com \
    /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).