From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhGbE-0002pY-2F for qemu-devel@nongnu.org; Tue, 28 May 2013 05:53:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhGbC-0006AA-66 for qemu-devel@nongnu.org; Tue, 28 May 2013 05:53:48 -0400 Received: from mail-qc0-x235.google.com ([2607:f8b0:400d:c01::235]:38385) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhGbC-0006A6-2a for qemu-devel@nongnu.org; Tue, 28 May 2013 05:53:46 -0400 Received: by mail-qc0-f181.google.com with SMTP id u11so3881767qcx.40 for ; Tue, 28 May 2013 02:53:45 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51A47E9E.2060900@redhat.com> Date: Tue, 28 May 2013 11:53:34 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1369228150-5428-1-git-send-email-afaerber@suse.de> <1369228150-5428-5-git-send-email-afaerber@suse.de> <519DEAA4.3090209@redhat.com> <51A47B5D.90702@suse.de> In-Reply-To: <51A47B5D.90702@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH qom-cpu 4/4] memory_mapping: Move stubs to libqemustub.a List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Cc: Vincent Rabin , Qiao Nuohan , qemu-devel@nongnu.org, Jens Freimann Il 28/05/2013 11:39, Andreas Färber ha scritto: > Am 23.05.2013 12:08, schrieb Paolo Bonzini: >> Il 22/05/2013 15:09, Andreas Färber ha scritto: >>> Allows us to drop CONFIG_NO_GET_MEMORY_MAPPING with its indirect >>> dependency on CONFIG_HAVE_GET_MEMORY_MAPPING in Makefile.target. >>> >>> Signed-off-by: Andreas Färber >>> --- >>> Makefile.target | 2 -- >>> stubs/Makefile.objs | 1 + >>> memory_mapping-stub.c => stubs/memory_mapping.c | 5 +++-- >>> 3 files changed, 4 insertions(+), 4 deletions(-) >>> rename memory_mapping-stub.c => stubs/memory_mapping.c (85%) > [...] >>> diff --git a/memory_mapping-stub.c b/stubs/memory_mapping.c >>> similarity index 85% >>> rename from memory_mapping-stub.c >>> rename to stubs/memory_mapping.c >>> index c48ea44..4db2108 100644 >>> --- a/memory_mapping-stub.c >>> +++ b/stubs/memory_mapping.c >>> @@ -11,8 +11,9 @@ >>> * >>> */ >>> >>> -#include "cpu.h" >>> -#include "exec/cpu-all.h" >>> +#include "qemu-common.h" >>> +#include "exec/cpu-common.h" >>> +#include "qom/cpu.h" >>> #include "sysemu/memory_mapping.h" >>> >>> int qemu_get_guest_memory_mapping(MemoryMappingList *list) >>> >> >> Patches 1-3 are fine. > > Thanks. > >> But I wonder if a better replacement for stubs is >> methods in CPU. > > None of the functions I have moved from *-stub.c to stubs/ operate on a > single CPU, cpu_get_memory_mapping and cpu_paging_enabled can be made methods in CPU, can't they? And as far as this patch is concerned, this only leaves out qemu_get_guest_memory_mapping. If you make cpu_paging_enabled and cpu_get_memory_mapping return a different value for "not supported" (e.g. -ENOSYS), qemu_get_guest_memory_mapping need not be a stub at all. Paolo so now that the conflict with the kdump format support has > been resolved I'd like to move them as a step towards dropping > per-target configure changes for guest-memory-dump support. > > With my note in the cover letter I was rather referring to > cpu_paging_enabled(), which is mandatory currently without any stub. > > Do you have a concrete suggestion what else to do for these stubs? > > Andreas >