From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBSSK-0005no-NT for qemu-devel@nongnu.org; Mon, 19 Aug 2013 12:37:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBSSD-00034Y-Ou for qemu-devel@nongnu.org; Mon, 19 Aug 2013 12:37:24 -0400 Received: from cantor2.suse.de ([195.135.220.15]:41694 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBSSD-000349-Hs for qemu-devel@nongnu.org; Mon, 19 Aug 2013 12:37:17 -0400 Message-ID: <521249B9.1050107@suse.de> Date: Mon, 19 Aug 2013 18:37:13 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 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> In-Reply-To: <87fvu6dnvy.fsf@blackfin.pond.sub.org> 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: Markus Armbruster Cc: aliguori@us.ibm.com, lersek@redhat.com, qemu-devel@nongnu.org, ehabkost@redhat.com 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, whic= h >>> 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. A= nd >=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 P= C >> 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. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg