From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USqe9-0001cM-NW for qemu-devel@nongnu.org; Thu, 18 Apr 2013 11:21:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USqe5-0002F8-2U for qemu-devel@nongnu.org; Thu, 18 Apr 2013 11:21:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USqe4-0002E3-Qo for qemu-devel@nongnu.org; Thu, 18 Apr 2013 11:21:08 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3IFL7KC006503 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Apr 2013 11:21:07 -0400 Date: Thu, 18 Apr 2013 11:21:06 -0400 From: Luiz Capitulino Message-ID: <20130418112106.36ca6c51@redhat.com> In-Reply-To: <516FE2AB.5060304@redhat.com> References: <1366275680-15416-1-git-send-email-kraxel@redhat.com> <516FE2AB.5060304@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Gerd Hoffmann , qemu-devel@nongnu.org On Thu, 18 Apr 2013 06:10:19 -0600 Eric Blake wrote: > On 04/18/2013 03:01 AM, Gerd Hoffmann wrote: > > Hi, > > > > This patch qom-ifies the QemuConsoles and adds an new, optional > > parameter to the screendump command to specify the device you > > want dump from. > > > > Question for the QOM guys: where in the tree should the QemuConsoles > > show up? I can't find anything in the tree doing this. I've placed > > them below /backend. See patch #2. Ok? Better suggestions? > > > > Question for the libvirt guys: Is it ok for libvirt to just extend the > > existing screendump command? Can libvirt figure there is a new > > (optional) parameter? See patch #5. > > The existing libvirt API is: > > char * > virDomainScreenshot(virDomainPtr domain, > virStreamPtr stream, > unsigned int screen, > unsigned int flags) > > which uses the screen argument to distinguish both between devices and > heads on a given device: > > * The screen ID is the sequential number of screen. In case of multiple > * graphics cards, heads are enumerated before devices, e.g. having > * two graphics cards, both with four heads, screen ID 5 addresses > * the second head on the second card. > > So yes, I think libvirt will be able to drive the new command by knowing > how many heads appear per device, then passing in the appropriate named > device to the QMP command. And yes, I'll review patch 5 regarding > interface design. We can extend screendump on HMP, but the general rule for QMP is to add a new command instead so that clients don't have to play tricks like Eric is suggesting :) Is there any big issue with adding a new command?