From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MOucJ-0006D7-2x for qemu-devel@nongnu.org; Thu, 09 Jul 2009 10:28:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MOucE-000662-Fw for qemu-devel@nongnu.org; Thu, 09 Jul 2009 10:28:54 -0400 Received: from [199.232.76.173] (port=38299 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOucE-00065h-4Q for qemu-devel@nongnu.org; Thu, 09 Jul 2009 10:28:50 -0400 Received: from mx2.redhat.com ([66.187.237.31]:34538) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MOucC-00012S-WF for qemu-devel@nongnu.org; Thu, 09 Jul 2009 10:28:49 -0400 Message-ID: <4A55FE23.4090205@redhat.com> Date: Thu, 09 Jul 2009 16:26:43 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 0/5] qdev: add driver class support. References: <1247144544-8885-1-git-send-email-kraxel@redhat.com> <200907091419.11248.paul@codesourcery.com> <4A55F30C.9000502@redhat.com> <200907091448.59926.paul@codesourcery.com> In-Reply-To: <200907091448.59926.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org On 07/09/09 15:48, Paul Brook wrote: > On Thursday 09 July 2009, Gerd Hoffmann wrote: >> I don't think this will work out in the general case. Some devices have >> properties which can be used for that, i.e. network cards have a mac >> address (no attribute yet but I expect it will come some day). Not >> every device class has specific properties you can use to identify them >> though. How would you identify a sound card for example? > > Ok, put it annother way: Why do you need to identify them? Why would libvirt > care whether a device is (say) a sound card or a VGA adapter? Because libvirt-based applications want present that to the user? The usual GUI workflow for adding devices is a two-step process: First pick the device class, then pick the actual device from a (short) list. > In principle > there's no reason why you shouldn't have many or none of both. Sure. But when you ask virt-manager to add a sound card to your virtual machine you don't want to have a VGA adapter in the list of possible devices. > IMHO the only reason we have the current grouping is because it's forced on us > by the various commandline options which mix host and machine configuration. That is actually another reason: Allow easy support of legacy command line options. Once all sound cards are converted to qdev '-soundhw ?' could list all sound cards by just walking the driver list and print the ones with class = SOUND. cheers, Gerd