From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLsvv-0007y4-Nb for qemu-devel@nongnu.org; Fri, 07 Mar 2014 06:27:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLsvn-0000pD-Pi for qemu-devel@nongnu.org; Fri, 07 Mar 2014 06:27:19 -0500 Received: from cantor2.suse.de ([195.135.220.15]:36928 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLsvn-0000oy-JM for qemu-devel@nongnu.org; Fri, 07 Mar 2014 06:27:11 -0500 Message-ID: <5319AD0C.9060800@suse.de> Date: Fri, 07 Mar 2014 12:27:08 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1394040647-20083-1-git-send-email-marcel.a@redhat.com> <1394040647-20083-4-git-send-email-marcel.a@redhat.com> <5319087A.3090403@suse.de> <1394170376.2663.24.camel@localhost.localdomain> In-Reply-To: <1394170376.2663.24.camel@localhost.localdomain> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 3/3] hw/boards: converted current_machine to be an instance of MachineCLass List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcel Apfelbaum Cc: qemu-devel@nongnu.org, ehabkost@redhat.com, mst@redhat.com, Alexey Kardashevskiy , armbru@redhat.com, lcapitulino@redhat.com, blauwirbel@gmail.com, aliguori@amazon.com, pbonzini@redhat.com, imammedo@redhat.com Am 07.03.2014 06:32, schrieb Marcel Apfelbaum: > On Fri, 2014-03-07 at 00:44 +0100, Andreas F=C3=A4rber wrote: >> Am 05.03.2014 18:30, schrieb Marcel Apfelbaum: >>> In order to allow attaching machine options to a machine instance, >>> current_machine is converted into MachineState. >>> As a first step of deprecating QEMUMachine, some of the functions >>> were modified to return MachineCLass. >>> >>> Signed-off-by: Marcel Apfelbaum >> >> Looks mostly good, but same issue as Alexey's patch: We are risking >> qdev_get_machine() creating a Container-typed /machine node. >> >> What about the following on top? > Hi Andreas, >=20 > I checked with the debugger and qdev_get_machine is called > long after we add the machine to the QOM tree. > However, the race still exists as someone can call qdev_get_machine > before the machine is added to the tree, not being aware of that. >=20 > Your change solves the problem, thank you! > Do you want me to add this diff and resend, > or I will send yours separately? My preference would be to avoid another round of review on my part by simply squashing into your 3/3. Cheers, 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