qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Alexander Graf <agraf@suse.de>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
	Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>,
	Jens Freimann <jfrei@linux.vnet.ibm.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [RFC] s390: dump-guest-memory implementation for s390x arch.
Date: Thu, 07 Mar 2013 12:30:34 +0100	[thread overview]
Message-ID: <51387A5A.1000701@de.ibm.com> (raw)
In-Reply-To: <5BF8D9F2-0DBF-4F82-87BD-1C427D30E9B0@suse.de>

>>>> diff --git a/target-s390x/arch_memory_mapping.c b/target-s390x/arch_memory_mapping.c
>>>> new file mode 100644
>>>> index 0000000..3dad3b9
>>>> --- /dev/null
>>>> +++ b/target-s390x/arch_memory_mapping.c
>>>> @@ -0,0 +1,26 @@
>>>> +/*
>>>> + * s390x memory mapping
>>>> + *
>>>> + * Copyright IBM Corp. 2012
>>>> + *
>>>> + * Authors:
>>>> + *     Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>
>>>> + *
>>>> + * This work is licensed under the terms of the GNU GPL, version 2 or later.
>>>> + * See the COPYING file in the top-level directory.
>>>> + *
>>>> + */
>>>> +
>>>> +#include "cpu.h"
>>>> +#include "exec/cpu-all.h"
>>>> +#include "sysemu/memory_mapping.h"
>>>> +
>>>> +int cpu_get_memory_mapping(MemoryMappingList *list, CPUArchState *env)
>>>> +{
>>>> +    return 0;
>>>> +}
>>>> +
>>>> +bool cpu_paging_enabled(CPUArchState *env)
>>>> +{
>>>> +    return false;
>>>
>>> Why? :)
>>
>> To make things compile :-)
>> Why no paging? The idea was to have some code that allows getting an ELF dump of a Linux kernel.
>> All existing tooling for s390 expects real memory dumps. 
>>
>> Actually having CONFIG_HAVE_GET_MEMORY_MAPPING=n would be a sane thing todo, but IIRC the common
>> code in dump.c references some functions that are only available with 
>> CONFIG_HAVE_GET_MEMORY_MAPPING=y. 
>>
>> /home/cborntra/REPOS/qemu/dump.c:84: undefined reference to `memory_mapping_list_free'
>> dump.o: In function `dump_init':
>> /home/cborntra/REPOS/qemu/dump.c:753: undefined reference to `memory_mapping_list_init'
>> /home/cborntra/REPOS/qemu/dump.c:757: undefined reference to `qemu_get_guest_simple_memory_mapping'
>> /home/cborntra/REPOS/qemu/dump.c:761: undefined reference to `memory_mapping_filter'
> 
> It might be better to just fix those places and not claim that you can fetch memory mappings then. QEMU has all the knowledge of s390 virtual memory you would need to implement it. I can see how you wouldn't need it for core dumps of the kernel, but it's confusing to claim dump support for VM and then say you don't.
> 
> 
> Alex

So you suggest to implementing stubs for those 4 functions in memory_mapping-stub.c and see if dumping
of a kernel still works with CONFIG_HAVE_GET_MEMORY_MAPPING=n, right?

Christian

  reply	other threads:[~2013-03-07 11:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1362044341-18775-1-git-send-email-jfrei@linux.vnet.ibm.com>
2013-03-07 10:49 ` [Qemu-devel] [RFC] s390: dump-guest-memory implementation for s390x arch Alexander Graf
2013-03-07 11:21   ` Christian Borntraeger
2013-03-07 11:26     ` Alexander Graf
2013-03-07 11:30       ` Christian Borntraeger [this message]
2013-03-07 11:40         ` Alexander Graf

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=51387A5A.1000701@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=agraf@suse.de \
    --cc=cornelia.huck@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).