From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUfbz-0003OQ-Gh for qemu-devel@nongnu.org; Tue, 23 Apr 2013 11:58:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUfbu-0006Xz-Q0 for qemu-devel@nongnu.org; Tue, 23 Apr 2013 11:58:31 -0400 Received: from e37.co.us.ibm.com ([32.97.110.158]:39937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUfbu-0006Xk-Im for qemu-devel@nongnu.org; Tue, 23 Apr 2013 11:58:26 -0400 Received: from /spool/local by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 23 Apr 2013 09:57:28 -0600 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 0F4263E40039 for ; Tue, 23 Apr 2013 09:54:22 -0600 (MDT) Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r3NFsYEC376630 for ; Tue, 23 Apr 2013 09:54:34 -0600 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r3NFsXvI018821 for ; Tue, 23 Apr 2013 09:54:34 -0600 Date: Tue, 23 Apr 2013 17:54:28 +0200 From: Jens Freimann Message-ID: <20130423155428.GA15345@linux.vnet.ibm.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5176ABB7.8080102@redhat.com> 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 , Ekaterina Tumanova , qemu-devel , Alexander Graf , Rabin Vincent , Christian Borntraeger , Paolo Bonzini , Andreas =?iso-8859-1?Q?F=E4rber?= On Tue, Apr 23, 2013 at 09:41:43AM -0600, 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. ok, will fix > 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'? sounds reasonable to me. regards Jens > -- > Eric Blake eblake redhat com +1-919-301-3266 > Libvirt virtualization library http://libvirt.org >