From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:32845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNSKI-0008Qp-Gj for qemu-devel@nongnu.org; Wed, 03 Apr 2013 14:22:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNSKH-0001gV-DV for qemu-devel@nongnu.org; Wed, 03 Apr 2013 14:22:26 -0400 Received: from cantor2.suse.de ([195.135.220.15]:58179 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNSKH-0001gK-7g for qemu-devel@nongnu.org; Wed, 03 Apr 2013 14:22:25 -0400 Message-ID: <515C7359.3080202@suse.de> Date: Wed, 03 Apr 2013 20:22:17 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1363876125-8264-1-git-send-email-imammedo@redhat.com> <1363876125-8264-13-git-send-email-imammedo@redhat.com> <5152D5A5.4030405@redhat.com> <20130403195800.0ba38817@thinkpad.mammed.net> In-Reply-To: <20130403195800.0ba38817@thinkpad.mammed.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 12/12] target-i386: implement CPU hot-add List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: kwolf@redhat.com, peter.maydell@linaro.org, aliguori@us.ibm.com, ehabkost@redhat.com, mst@redhat.com, jan.kiszka@siemens.com, stefano.stabellini@eu.citrix.com, claudio.fontana@huawei.com, qemu-devel@nongnu.org, aderumier@odiso.com, armbru@redhat.com, blauwirbel@gmail.com, quintela@redhat.com, alex.williamson@redhat.com, kraxel@redhat.com, anthony.perard@citrix.com, yang.z.zhang@intel.com, Paolo Bonzini , lcapitulino@redhat.com, rth@twiddle.net Am 03.04.2013 19:58, schrieb Igor Mammedov: > On Wed, 27 Mar 2013 12:19:01 +0100 > Paolo Bonzini wrote: >=20 >> Il 21/03/2013 15:28, Igor Mammedov ha scritto: >>> + if (x86_cpu_is_cpu_exist(qdev_get_machine(), &apic_id)) { >> >> Similarly, can this be done in qmp_cpu_set? And should it really be a= n > I've tried to abstract qmp part from target/implementation details. > We could introduce global func like, and then use it if from QMP subsys= tem: > bool is_cpu_exist(int64_t id) { > ... iterate over CPUs ... > if (cpu->get_firmware_id() =3D=3D id) > return true; > ... > } >=20 > Andreas, Is it acceptable if I add it to qom/cpu.h, If you make it cpu_exists() then sure, > qom/cpu.c ? but this is not going to work yet, you may need to place it in cpus.c due to first_cpu and next_cpu operating on CPUArchState. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg