Received: from eggs.gnu.org ([2001:4830:134:3::10]:37737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0Sqv-0003RY-BG for qemu-devel@nongnu.org; Wed, 11 May 2016 08:02:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0Sqp-0005aA-IK for qemu-devel@nongnu.org; Wed, 11 May 2016 08:02:57 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:38656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0Sqp-0005Zr-7P for qemu-devel@nongnu.org; Wed, 11 May 2016 08:02:51 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 11 May 2016 13:02:49 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 5CBE021900C6 for ; Wed, 11 May 2016 13:02:20 +0100 (BST) Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u4BC2iLb23724416 for ; Wed, 11 May 2016 12:02:44 GMT Received: from d06av08.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u4BC2i6Q014271 for ; Wed, 11 May 2016 06:02:44 -0600 Date: Wed, 11 May 2016 14:02:43 +0200 From: Cornelia Huck Message-ID: <20160511140243.7d0bd86d.cornelia.huck@de.ibm.com> In-Reply-To: <57331251.1080301@openvz.org> References: <1462960324-4655-1-git-send-email-den@openvz.org> <20160511123419.0e96ee16.cornelia.huck@de.ibm.com> <57331251.1080301@openvz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC for 2.7 0/2] virtio: show guest features in 'info qtree' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" On Wed, 11 May 2016 14:06:57 +0300 "Denis V. Lunev" wrote: > On 05/11/2016 01:34 PM, Cornelia Huck wrote: > > On Wed, 11 May 2016 12:52:02 +0300 > > "Denis V. Lunev" wrote: > > > >> It is very convinient and useful for debug purpose to expose the set of > >> features negotiated with guest. The patch exports those features via > >> read-only bit properties. > > I agree that it would be very helpful to be able to access the > > negotiated features via the monitor, but I disagree with your approach, > > especially the need to expose every single feature bit via a property. > > > > What about a command like 'info virtio' instead? This would allow us to > > dump not only guest features, but the host features initially offered > > alongside them and things like the status byte (so you can actually > > check whether feature negotiation was successful). Maybe similar to > > 'info block'. > > > Hmmm. Do you propose to print bits as HEX? Just print a 1 if the bit is set. This would make it easy to see if e.g. the guest only negotiated a small subset of the offered features. > Because if we are going > have then splitted out we have to provide individual bit descriptions. > Thus the amount of code could be similar. > > Actually I can add generic dump code into VirtIODevice and will use > host_features/guest_features fields but we should have a callback > defined for each device which will provide bit names. What about the individual drivers providing an array of strings for the feature names? Then you could easily print a list of feature bit names. For the virtio status (which I would find as useful as the feature bits), it's even easier as the status bits are common.