From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGs8H-0000Qs-OA for qemu-devel@nongnu.org; Thu, 29 Jan 2015 11:39:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGs8E-0003kG-JE for qemu-devel@nongnu.org; Thu, 29 Jan 2015 11:39:53 -0500 Received: from cantor2.suse.de ([195.135.220.15]:59822 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGs8E-0003jX-9p for qemu-devel@nongnu.org; Thu, 29 Jan 2015 11:39:50 -0500 Message-ID: <54CA6250.1010402@suse.de> Date: Thu, 29 Jan 2015 17:39:44 +0100 From: =?windows-1252?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <54b41fb0134597f3a1bba41febdbe59acc268fa5.1421214155.git.zhugh.fnst@cn.fujitsu.com> <20150129154603.7cbfffcb@nial.brq.redhat.com> <20150129160139.GD30651@thinpad.lan.raisama.net> In-Reply-To: <20150129160139.GD30651@thinpad.lan.raisama.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6Iu38N030MlmEgUVxVXMk1TMs3wORi7Dg" Subject: Re: [Qemu-devel] [PATCH v3 6/7] cpu: add device_add foo-x86_64-cpu support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , Igor Mammedov Cc: Zhu Guihua , Andrew Jones , qemu-devel@nongnu.org, tangchen@cn.fujitsu.com, chen.fan.fnst@cn.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com, Paolo Bonzini , guz.fnst@cn.fujitsu.com, anshul.makkar@profitbricks.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --6Iu38N030MlmEgUVxVXMk1TMs3wORi7Dg Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Am 29.01.2015 um 17:01 schrieb Eduardo Habkost: > On Thu, Jan 29, 2015 at 03:46:03PM +0100, Igor Mammedov wrote: > [...] >>> @@ -2742,7 +2776,14 @@ static void x86_cpu_apic_create(X86CPU *cpu, E= rror **errp) >>> =20 >>> object_property_add_child(OBJECT(cpu), "apic", >>> OBJECT(cpu->apic_state), NULL); >>> - qdev_prop_set_uint8(cpu->apic_state, "id", env->cpuid_apic_id); >>> + >>> + apic_id =3D object_property_get_int(OBJECT(cpu), "apic-id", NULL= ); >>> + if (apic_id =3D=3D APIC_ID_NOT_SET) { >> Do we have in QOM a way to check if property was ever set? >=20 > I don't believe the QOM property model has any abstraction for unset > properties. Correct. The only way I can think of is turning it into a custom "dynamic" property, which lets you set some flag in the setter. Using a custom implementation for a static property might also be an option. But as a general reminder, this series does not seem to address some of the modeling considerations I had brought up, so I am again prioritizing work on an RFC for a cross-target QOM topology abstraction (me and Eduardo each had some early x86 patches to that effect iirc) and am still considering this v3 more of an RFC destined at testing hot-unplug on top, which will then be rebased on whatever structure we agree on. Regards, Andreas --=20 SUSE Linux GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Felix Imend=F6rffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton; HRB 21284 (AG N=FCrnberg) --6Iu38N030MlmEgUVxVXMk1TMs3wORi7Dg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUymJTAAoJEPou0S0+fgE/1awP/jjqPzkOSkfVeWxRR8Q6zm6s bAbMXPFtTKsYSLuwviD/TsGmgwD3CHx7Jpn8j25q/LYZqzHaw98OHGGkEj+72APe QZUqYgT3q0pkE6bMHoLHoKKpOIefuevrhcorp/NAHe7g/4DvIIX4EBZwvacZULKF 7zs74xWhxkN2wTqQZX2YnbLlDEtfXa2q89dZPDdYYSe1EhHXyuAqIjKBCpd/orop gDFx7yWNxxDnlQbs0U29KiWnHdeEEGsiSnyjD0KBg6GhUFLtnZAsbuvPI/C8B8Ul XF6LrsrJgskpGb728+Zr55bV1NjVvyc9+RtBeSlbYlfTUeeHgdjCXZGWJRKfudgw EEJSxS6Eljtlu1ZZKPw4DJw3ESzBXv7T9mCLEga+EDe8VSMtEtbBehqYQYQTDv+k NDQ8FCV85V9SiGathrbHrMxWZL/JdsUwSoOyloMM28/lWrScnhq95z7Y1G3/3e+5 RBPUuLjx3zl8ezYP3Bsgnzzaxmwm2ku5hxPqy+/IOhrXDSAetUD096E+2erGe0rw dccJHKLjVy4Ovun8W0At9uU3oGwKz7YvuEBkwhzxTBkDtU4M7YQH3eST2MU++V0X HIT8uBSWbClvy6w1ngF01q2j0PbQH2elhktyQ4Vdc2lGLXlpDCnNtNPRalIJeQRE Fyfb/1fOkktgro5nUNEO =Czpb -----END PGP SIGNATURE----- --6Iu38N030MlmEgUVxVXMk1TMs3wORi7Dg--