From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36736) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0sS8-0006w6-P8 for qemu-devel@nongnu.org; Sun, 21 Jul 2013 08:09:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V0sS7-0000Ci-5U for qemu-devel@nongnu.org; Sun, 21 Jul 2013 08:09:28 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45781 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0sS6-0000CR-Pw for qemu-devel@nongnu.org; Sun, 21 Jul 2013 08:09:27 -0400 Message-ID: <51EBCF70.3070303@suse.de> Date: Sun, 21 Jul 2013 14:09:20 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1374136063-24399-1-git-send-email-marcel.a@redhat.com> In-Reply-To: <1374136063-24399-1-git-send-email-marcel.a@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH 0/2] qemu-help: improve -device command line help List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcel Apfelbaum Cc: pbonzini@redhat.com, aliguori@us.ibm.com, qemu-devel@nongnu.org, "Michael S. Tsirkin" Hi, Am 18.07.2013 10:27, schrieb Marcel Apfelbaum: > Running qemu with "-device ?" option returns ~145 lines. > It is hard to manage understanding the output. >=20 > Theses patches aim to partially solve the problem by dividing the devic= es > into logical categories like "Network/Display/..." and sorting them by = it. >=20 > Marcel Apfelbaum (2): > qemu-help: Sort devices by logical functionality > devices: Associate devices to their logical category Sorry to jump on this discussion. I think the idea to structure devices better does make sense. However I feel that the implementation is not ide= al: For one, this adds a new field and uses it only for command line output, while not benefiting libvirt or other QMP users. For another, this adds a third tree overlay over devices: We have the QOM inheritance tree with classifications such as PCIDevice, ISADevice, VirtioDevice, USBDevice, etc. We have Paolo's hw/ directory restructuring, which uses scsi, intc, timer, etc. sub-directories. The proposed category system is different from the sub-directories (e.g., scsi/ vs STORAGE) and is completely manual, i.e. double work. So I wonder if it would be possible to define the category per Makefile.objs (whether in hw/Makefile.objs or in hw/*/Makefile.objs). Or whether we can just reuse the type hierarchy and sort per base class for now - the result would be different from the proposed categories but hopefully reproducible elsewhere (assuming the base type is exposed in QMP). Anthony had in the past suggested to change our inheritance tree so that PCIDevice becomes an interface and the base class would be specific to the chipset, i.e. might end up similar to the proposed categories. (Getting rid of the parent field assumptions is a large prerequisite for changing inheritance.) Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg