From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDZ22-0007EA-Bt for qemu-devel@nongnu.org; Thu, 07 Mar 2013 06:30:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDZ20-0000mU-DY for qemu-devel@nongnu.org; Thu, 07 Mar 2013 06:30:42 -0500 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:58114) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDZ20-0000mI-5n for qemu-devel@nongnu.org; Thu, 07 Mar 2013 06:30:40 -0500 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 7 Mar 2013 11:28:48 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 78EA21B0806E for ; Thu, 7 Mar 2013 11:30:36 +0000 (GMT) Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r27BUR3f32309424 for ; Thu, 7 Mar 2013 11:30:27 GMT Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r27AOBjs027395 for ; Thu, 7 Mar 2013 05:24:11 -0500 Message-ID: <51387A5A.1000701@de.ibm.com> Date: Thu, 07 Mar 2013 12:30:34 +0100 From: Christian Borntraeger MIME-Version: 1.0 References: <1362044341-18775-1-git-send-email-jfrei@linux.vnet.ibm.com> <01D33F43-4124-44FC-A5ED-34A73C41863F@suse.de> <51387834.8050800@de.ibm.com> <5BF8D9F2-0DBF-4F82-87BD-1C427D30E9B0@suse.de> In-Reply-To: <5BF8D9F2-0DBF-4F82-87BD-1C427D30E9B0@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC] s390: dump-guest-memory implementation for s390x arch. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Cornelia Huck , Ekaterina Tumanova , Jens Freimann , qemu-devel >>>> 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 >>>> + * >>>> + * 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