From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mi8jy-0000z1-No for qemu-devel@nongnu.org; Mon, 31 Aug 2009 11:24:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mi8jt-0000tj-MO for qemu-devel@nongnu.org; Mon, 31 Aug 2009 11:24:18 -0400 Received: from [199.232.76.173] (port=33437 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mi8jt-0000tP-Di for qemu-devel@nongnu.org; Mon, 31 Aug 2009 11:24:13 -0400 Received: from mail-ew0-f223.google.com ([209.85.219.223]:60439) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mi8jt-0008C9-2s for qemu-devel@nongnu.org; Mon, 31 Aug 2009 11:24:13 -0400 Received: by ewy23 with SMTP id 23so4609075ewy.8 for ; Mon, 31 Aug 2009 08:24:12 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4A9B85E5.8040902@redhat.com> References: <4A9B85E5.8040902@redhat.com> From: Blue Swirl Date: Mon, 31 Aug 2009 18:23:52 +0300 Message-ID: Subject: Re: [Qemu-devel] [PATCH, RFC 0/5] Improve device info handling Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel On Mon, Aug 31, 2009 at 11:12 AM, Gerd Hoffmann wrote: > =C2=A0Hi, > >> Add info command registration to the API and make some devices use it. > > Jumping in here with a more general comment ... > > I think right now we have _way_ to much register_something functions. > IMHO qdev allows us to kill off most of them. =C2=A0We can stick function > pointers (also VMstate pointers) into DeviceInfo instead of registering > callbacks. Good idea. I wish reset could be handled also with a structure. > Short-term (while we are in the "convert-drivers-to-qdev" phase) that wil= l > just move the register calls from the driver code to generic qdev code. > > Long-term we hopefully can kill the register calls altogether and walk th= e > qdev device tree instead. So at this stage, the registration function should take a structure argument but later it would be sucked into qdev? >> User visible monitor commands change: 'info' is replaced by 'dev_info' >> and also the parameter name may change, for example 'pic' becomes >> 'i8259.state'. > > Hmm, i8259 isn't converted to qdev yet, so the route outlined above above > will not work (yet) for this device ... There is also no qdev for pc.c. Maybe there should be one qdev for each board? The higher level could set up common things like system reset signal, memory, drives etc. Maybe even PCI.