qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] Split out dump-guest-memory memory mapping c


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH v2] Split out dump-guest-memory memory mapping code
Date: Mon, 20 May 2013 22:22:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

Am 17.05.2013 22:11, schrieb Jens Freimann:
> From: Ekaterina Tumanova <address@hidden>
> 
> 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 <address@hidden>
> Signed-off-by: Jens Freimann <address@hidden>
> 
> ---
> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]