From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLvms-0004OJ-1U for qemu-devel@nongnu.org; Wed, 10 Oct 2012 08:53:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLvmm-0002gx-48 for qemu-devel@nongnu.org; Wed, 10 Oct 2012 08:53:21 -0400 Received: from cantor2.suse.de ([195.135.220.15]:36912 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLvml-0002gp-Qe for qemu-devel@nongnu.org; Wed, 10 Oct 2012 08:53:16 -0400 Message-ID: <50756FB7.10606@suse.de> Date: Wed, 10 Oct 2012 14:53:11 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1349803038-30502-1-git-send-email-imammedo@redhat.com> <50754779.6000809@suse.de> <20121010144939.2cee7566@nial.usersys.redhat.com> In-Reply-To: <20121010144939.2cee7566@nial.usersys.redhat.com> 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: Igor Mammedov Cc: aliguori@us.ibm.com, ehabkost@redhat.com, jan.kiszka@siemens.com, Don@CloudSwitch.com, mtosatti@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino Am 10.10.2012 14:49, schrieb Igor Mammedov: > On Wed, 10 Oct 2012 12:01:29 +0200 > Andreas F=E4rber wrote: >=20 >> 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 i= s >>> moved into x86_cpu_apic_init() which is called from x86_cpu_realize()= . >>> >>> [1] - all x86 cpus have integrated APIC if we overlook existence of i= 486, >>> and it's more convenient to model after majority of them. >>> >>> Signed-off-by: Igor Mammedov >> >> 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). >> >>> + 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 pl= aces > is a better than using an existing macro.=20 I thought their intention was to have specialized rather than standard messages, so maybe "An APIC of type '%s' could not be created." and "The APIC of type '%s' could not be initialized."? Andreas >=20 >>> + return; >>> + } >> [...] >>> + if (qdev_init(env->apic_state)) { >>> + error_set(errp, QERR_DEVICE_INIT_FAILED,u >>> + object_get_typename(OBJECT(env->apic_state))); >>> + return; >>> + } >> >> 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 --=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