From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVmbw-0005Lt-Eh for qemu-devel@nongnu.org; Fri, 26 Apr 2013 13:39:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVmbu-00061i-R7 for qemu-devel@nongnu.org; Fri, 26 Apr 2013 13:39:04 -0400 Received: from cantor2.suse.de ([195.135.220.15]:37573 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVmbu-00061c-KV for qemu-devel@nongnu.org; Fri, 26 Apr 2013 13:39:02 -0400 Message-ID: <517ABBB5.5070404@suse.de> Date: Fri, 26 Apr 2013 19:39:01 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <517AAF7A.1080604@suse.de> <1366997396-22996-1-git-send-email-imammedo@redhat.com> In-Reply-To: <1366997396-22996-1-git-send-email-imammedo@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 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: Igor Mammedov Cc: Peter Maydell , aliguori@us.ibm.com, qemu-devel@nongnu.org, ehabkost@redhat.com 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) { http://wiki.qemu.org/QOMConventions Anthony asked to not do FOO(x)->bar. Please add a DeviceState *dev variable above. > + error_setg(errp, "Attempt to set property '%s' on '%s' after " > + "it was realized", name, object_get_typename(obj)); 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. Andreas > + return; > + } > + > visit_type_int(v, &value, name, &error); > if (error) { > error_propagate(errp, error); >=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