From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MLeB2-0000fY-VZ for qemu-devel@nongnu.org; Tue, 30 Jun 2009 10:19:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MLeAy-0000cv-58 for qemu-devel@nongnu.org; Tue, 30 Jun 2009 10:19:16 -0400 Received: from [199.232.76.173] (port=43456 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MLeAx-0000cl-VJ for qemu-devel@nongnu.org; Tue, 30 Jun 2009 10:19:12 -0400 Received: from mx2.redhat.com ([66.187.237.31]:47897) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MLeAx-0007jC-D0 for qemu-devel@nongnu.org; Tue, 30 Jun 2009 10:19:11 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5UEJAx8025008 for ; Tue, 30 Jun 2009 10:19:10 -0400 Message-ID: <4A4A1EDA.2010700@redhat.com> Date: Tue, 30 Jun 2009 16:19:06 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1246361503-18254-1-git-send-email-kraxel@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [RfC PATCH] qdev: rework device properties. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org On 06/30/09 16:03, Juan Quintela wrote: > Gerd Hoffmann wrote: >> Early RfC patch. Not functional yet. Just for comments right now. >> >> Overall plan: >> * drop property lists. The properties are saved directly in the >> device state structs instead. >> * drop qdev_get_prop* functions, not needed any more. >> * replace qdev_set_prop* functions by qdev_prop_{parse,set*}. >> >> Done: >> * added code to handle properties. >> >> Todo: >> * convert all the device drivers. >> * actually drop the old functions. > > Any good reason why you remove the list of propierties? Pointless indirection and extra storage. Note that this doesn't mean properties itself go away. > a- a way to defino an alias, that "mouse" is equivalent to "QEMU USB > Keyboard". One is the qdev name and the other is the name passed to > --usbdevice name. stick an alias next to name in DeviceInfo? I don't see why this should use properties. > b- things like disk are composed of: > "disk" : "rest of disk arguments" No. You'll create the host state from most of "rest of disk arguments". You'll attach a name property to qdev so the driver has a handle to lookup the host side of things. cheers, Gerd