From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLvjV-0003Bf-Bq for qemu-devel@nongnu.org; Wed, 10 Oct 2012 08:49:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLvjR-0001H8-5a for qemu-devel@nongnu.org; Wed, 10 Oct 2012 08:49:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5194) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLvjQ-0001Fz-TZ for qemu-devel@nongnu.org; Wed, 10 Oct 2012 08:49:49 -0400 Date: Wed, 10 Oct 2012 14:49:39 +0200 From: Igor Mammedov Message-ID: <20121010144939.2cee7566@nial.usersys.redhat.com> In-Reply-To: <50754779.6000809@suse.de> References: <1349803038-30502-1-git-send-email-imammedo@redhat.com> <50754779.6000809@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3] target-i386: initialize APIC at CPU level List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?ISO-8859-1?B?RuRyYmVy?= Cc: aliguori@us.ibm.com, ehabkost@redhat.com, jan.kiszka@siemens.com, Don@CloudSwitch.com, mtosatti@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino On Wed, 10 Oct 2012 12:01:29 +0200 Andreas F=E4rber wrote: > Am 09.10.2012 19:17, schrieb Igor Mammedov: > > (L)APIC is a part of cpu [1] so move APIC initialization inside of > > x86_cpu object. Since cpu_model and override flags currently specify > > whether APIC should be created or not, APIC creation&initialization is > > moved into x86_cpu_apic_init() which is called from x86_cpu_realize(). > >=20 > > [1] - all x86 cpus have integrated APIC if we overlook existence of i48= 6, > > and it's more convenient to model after majority of them. > >=20 > > Signed-off-by: Igor Mammedov >=20 > I am happy with this latest round of fixes to ad-hoc feedback from my > CPU remodeling perspective (as an interim solution), and I depend on > this for my APIC changes (code is being moved around here). >=20 > > + if (env->apic_state =3D=3D NULL) { > > + error_set(errp, QERR_DEVICE_INIT_FAILED, apic_type); This is equivalent to error_setg(errp, "Device '%s' could not be initialized",...). I'm not sure if repeating the same string in many places is a better than using an existing macro.=20 > > + return; > > + } > [...] > > + if (qdev_init(env->apic_state)) { > > + error_set(errp, QERR_DEVICE_INIT_FAILED,u > > + object_get_typename(OBJECT(env->apic_state))); > > + return; > > + } >=20 > Luiz, could you please take a look whether I can apply this to my > qom-cpu tree now or whether error_set() should be replaced by > error_setg() or something? Contents-wise these are error-checking > creation and initialization of a child (APIC) device/object. >=20 > Thanks, > Andreas >=20