From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O90Jk-0004Ti-Rg for qemu-devel@nongnu.org; Mon, 03 May 2010 14:24:32 -0400 Received: from [140.186.70.92] (port=46507 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O90Jc-0003ND-5U for qemu-devel@nongnu.org; Mon, 03 May 2010 14:24:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O90JS-0003LC-A4 for qemu-devel@nongnu.org; Mon, 03 May 2010 14:24:15 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:40695) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O90JP-0003KL-Ir for qemu-devel@nongnu.org; Mon, 03 May 2010 14:24:14 -0400 Received: by gyd5 with SMTP id 5so1297486gyd.4 for ; Mon, 03 May 2010 11:24:10 -0700 (PDT) Message-ID: <4BDF14C2.1030404@codemonkey.ws> Date: Mon, 03 May 2010 13:24:02 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v2] Write cmos hd data for ide drives using -device parm References: <4BC482850200004800092E82@sinclair.provo.novell.com> <4BC56D9A.7010606@redhat.com> <4BCC63030200004800093962@sinclair.provo.novell.com> <4BCD5796.1030502@redhat.com> In-Reply-To: <4BCD5796.1030502@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org, Bruce Rogers On 04/20/2010 02:28 AM, Gerd Hoffmann wrote: > Hi, > >> Not much traffic on this thread ;-) > > Indeed ;) > >> I can see the usefulness of an init_late() to generalize post device >> setup issues. >> I assume then that you didn't have any other issues with my patch, >> other than general code structure concerns? > > Yes, that is the major one. I think it is much saner to just have a > init_late() and collect everything there instead of creating a new > hook each time you figure you need one. > > I think this also allows to make the ide changes less intrusive as all > the cmos setup logic stays local to pc.c. pc.c can simply keep a > pointer to the DeviceState structs of the ide interface(s) created in > pc_init1(). pc_init_late() then can check which drives are plugged in > and update cmos accordingly. I'd personally prefer to see some sort of registration mechanism. Something notifier based. Regards, Anthony Liguori > cheers, > Gerd > > > >