Received: from eggs.gnu.org ([2001:4830:134:3::10]:42197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBhw7-00037O-Cf for qemu-devel@nongnu.org; Tue, 20 Aug 2013 05:09:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBhw2-0006o4-Hw for qemu-devel@nongnu.org; Tue, 20 Aug 2013 05:09:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13114) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBhw2-0006np-9G for qemu-devel@nongnu.org; Tue, 20 Aug 2013 05:09:06 -0400 From: Markus Armbruster References: <1376659114-6630-1-git-send-email-armbru@redhat.com> <1376659114-6630-7-git-send-email-armbru@redhat.com> <520F75AB.9020904@suse.de> <87fvu6dnvy.fsf@blackfin.pond.sub.org> <521249B9.1050107@suse.de> Date: Tue, 20 Aug 2013 11:09:03 +0200 In-Reply-To: <521249B9.1050107@suse.de> ("Andreas =?utf-8?Q?F=C3=A4rber=22?= =?utf-8?Q?'s?= message of "Mon, 19 Aug 2013 18:37:13 +0200") Message-ID: <87d2p8pw40.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 6/7] vl: Set current_machine early List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?utf-8?Q?F=C3=A4rber?= Cc: aliguori@us.ibm.com, lersek@redhat.com, qemu-devel@nongnu.org, ehabkost@redhat.com Andreas F=C3=A4rber writes: > Am 19.08.2013 11:35, schrieb Markus Armbruster: >> Andreas F=C3=A4rber writes: >>=20 >>> Am 16.08.2013 15:18, schrieb armbru@redhat.com: >>>> From: Markus Armbruster >>>> >>>> I'd like to access QEMUMachine from a QEMUMachine init() method, which >>>> is currently not possible. Instead of passing it as an argument, I >>>> simply set current_machine earlier. >>> >>> We had such a patch for CPU hot-add and decided against doing this. >>> Currently current_machine !=3D signals that it has been initialized. And >>=20 >> Does any code actually depend on this undocumented condition? I found >> none. > > I didn't audit. Currently the users are limited to vl.c itself, > device-hotplug.c for block_default_type and qmp.c for hot_add_cpu. pc.c > feels odd in that mix. > > [...] >>> Can't you pass either QEMUMachine or the specific fields needed from PC >>> code to those SMBIOS functions? You did add a bool argument. >>=20 >> Can't see how to do that without passing the machine to QEMUMachine >> method init(), which involves touching all boards. I doubt that's a >> good idea, but if you insist, I can do it. > > Isn't that exactly what QEMUMachineArgs was meant to address? :) > Had a look at your don't-explode patches and they looked good. I could give it a try, but to be honest, I'm reluctant to base new work on a series that has been ignored by all committers for more than two months.