From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UV3BJ-0008V5-Lx for qemu-devel@nongnu.org; Wed, 24 Apr 2013 13:08:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UV3BD-0006G9-F0 for qemu-devel@nongnu.org; Wed, 24 Apr 2013 13:08:33 -0400 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:38893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UV3BD-0006AW-6E for qemu-devel@nongnu.org; Wed, 24 Apr 2013 13:08:27 -0400 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 24 Apr 2013 18:04:23 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id A60321B0805F for ; Wed, 24 Apr 2013 18:07:59 +0100 (BST) Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by b06cxnps4074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r3OH7nPs55181550 for ; Wed, 24 Apr 2013 17:07:49 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 r3OFphC2014328 for ; Wed, 24 Apr 2013 11:51:44 -0400 Message-ID: <5178116D.2070900@linux.vnet.ibm.com> Date: Wed, 24 Apr 2013 21:07:57 +0400 From: Ekaterina Tumanova MIME-Version: 1.0 References: <1366731014-48790-1-git-send-email-jfrei@linux.vnet.ibm.com> <1366731014-48790-2-git-send-email-jfrei@linux.vnet.ibm.com> <5176ABB7.8080102@redhat.com> In-Reply-To: <5176ABB7.8080102@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] Split out dump-guest-memory memory mapping code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Peter Maydell , qemu-devel , Alexander Graf , Rabin Vincent , Christian Borntraeger , Jens Freimann , Paolo Bonzini , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= On 04/23/2013 07:41 PM, Eric Blake wrote: > On 04/23/2013 09:30 AM, Jens Freimann wrote: >> 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 >> Signed-off-by: Jens Freimann >> --- >> +++ b/include/qapi/qmp/qerror.h >> @@ -249,4 +249,7 @@ void assert_no_error(Error *err); >> #define QERR_SOCKET_CREATE_FAILED \ >> ERROR_CLASS_GENERIC_ERROR, "Failed to create socket" >> >> +#define QERR_UNSUPPORTED_COMMAND_OPTION \ >> + ERROR_CLASS_GENERIC_ERROR, "Option(s) %s of %s command not supported for %s" > Rather than adding a new QERR_* constant here, just use error_setg() in > qmp_dump_guest_memory() in the first place. > > This raises an interesting question about introspection - how will > management apps (such as libvirt) be able to determine whether the > paging command is supported for a given architecture? Do we need to > expand the 'MachineInfo' QMP datatype so that 'query-machines' can tell > us whether a given machine will support or reject attempts to set > 'paging':true during 'dump-guest-memory'? > as far as I understand libvirt doesn't actually use -p dump-guest-memory parameter. and virsh dump doesn't have paging param