From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVmks-0005re-2X for qemu-devel@nongnu.org; Fri, 26 Apr 2013 13:48:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVmkq-0001wG-ER for qemu-devel@nongnu.org; Fri, 26 Apr 2013 13:48:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57369) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVmkq-0001vv-3y for qemu-devel@nongnu.org; Fri, 26 Apr 2013 13:48:16 -0400 Date: Fri, 26 Apr 2013 19:48:11 +0200 From: Igor Mammedov Message-ID: <20130426194811.28918bed@thinkpad> In-Reply-To: <517ABBB5.5070404@suse.de> References: <517AAF7A.1080604@suse.de> <1366997396-22996-1-git-send-email-imammedo@redhat.com> <517ABBB5.5070404@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] target-i386: Do not allow to set apic-id one CPU is realized List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?ISO-8859-1?B?RuRyYmVy?= Cc: Peter Maydell , aliguori@us.ibm.com, qemu-devel@nongnu.org, ehabkost@redhat.com On Fri, 26 Apr 2013 19:39:01 +0200 Andreas F=E4rber wrote: > Am 26.04.2013 19:29, schrieb Igor Mammedov: > > Signed-off-by: Igor Mammedov > > --- > > target-i386/cpu.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > >=20 > > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > > index f1cecc0..3152ad5 100644 > > --- a/target-i386/cpu.c > > +++ b/target-i386/cpu.c > > @@ -1289,6 +1289,12 @@ static void x86_cpuid_set_apic_id(Object *obj, V= isitor *v, void *opaque, > > Error *error =3D NULL; > > int64_t value; > > =20 > > + if (DEVICE(obj)->realized) { >=20 > http://wiki.qemu.org/QOMConventions >=20 > Anthony asked to not do FOO(x)->bar. Please add a DeviceState *dev > variable above. Ok, I wanted to save a line. I'll repost in a minute. >=20 > > + error_setg(errp, "Attempt to set property '%s' on '%s' after " > > + "it was realized", name, object_get_typename(obj)); >=20 > Peter had introduced a helper for that that you had pointed me to > before, but I believe it's static in qdev-properties.c, so copying seems > the easiest here. Fine with me if you could address the above. >=20 > Andreas >=20 > > + return; > > + } > > + > > visit_type_int(v, &value, name, &error); > > if (error) { > > error_propagate(errp, error); > >=20 >=20 >=20 > --=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 >=20 --=20 Regards, Igor