From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOF3E-0005Y5-05 for qemu-devel@nongnu.org; Fri, 05 Apr 2013 18:24:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOF3B-0000N7-M1 for qemu-devel@nongnu.org; Fri, 05 Apr 2013 18:24:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOF3B-0000Mx-De for qemu-devel@nongnu.org; Fri, 05 Apr 2013 18:24:01 -0400 Date: Sat, 6 Apr 2013 00:23:45 +0200 From: Igor Mammedov Message-ID: <20130406002345.17a6451c@thinkpad.mammed.net> In-Reply-To: <20130405161502.GZ2719@otherpad.lan.raisama.net> References: <1365172636-28628-1-git-send-email-imammedo@redhat.com> <1365172636-28628-19-git-send-email-imammedo@redhat.com> <20130405161502.GZ2719@otherpad.lan.raisama.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 18/22] target-i386: move APIC to ICC bus List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: aliguori@us.ibm.com, claudio.fontana@huawei.com, qemu-devel@nongnu.org, aderumier@odiso.com, lcapitulino@redhat.com, jfrei@linux.vnet.ibm.com, yang.z.zhang@intel.com, pbonzini@redhat.com, afaerber@suse.de, lig.fnst@cn.fujitsu.com, rth@twiddle.net On Fri, 5 Apr 2013 13:15:03 -0300 Eduardo Habkost wrote: > On Fri, Apr 05, 2013 at 04:37:10PM +0200, Igor Mammedov wrote: > [...] > > void pc_cpus_init(const char *cpu_model) > > { > > int i; > > + X86CPU *cpu; > > Error *error =3D NULL; > > + SysBusDevice *ib; > > =20 > > /* init CPUs */ > > if (cpu_model =3D=3D NULL) { > > @@ -902,14 +907,22 @@ void pc_cpus_init(const char *cpu_model) > > #endif > > } > > =20 > > + ib =3D SYS_BUS_DEVICE(object_resolve_path_type("icc-bridge", > > + TYPE_ICC_BRIDGE, NULL= )); > > + > > for (i =3D 0; i < smp_cpus; i++) { > > - pc_new_cpu(cpu_model, x86_cpu_apic_id_from_index(i), &error); > > + cpu =3D pc_new_cpu(cpu_model, x86_cpu_apic_id_from_index(i), &= error); > > if (error) { > > fprintf(stderr, "%s\n", error_get_pretty(error)); > > error_free(error); > > exit(1); > > } > > } > > + > > + /* map APIC MMIO area if CPU has it */ > > + if (cpu->env.apic_staiy) { > > + sysbus_mmio_map_overlap(ib, 0, APIC_DEFAULT_ADDRESS, 0x1000); > > + } >=20 > GCC doesn't like this: >=20 > make[1]: Entering directory `/home/ehabkost/rh/proj/virt/qemu/x86_64-soft= mmu' > cc -I. -I/home/ehabkost/rh/proj/virt/qemu -I/home/ehabkost/rh/proj/virt/q= emu/include -I/home/ehabkost/rh/proj/virt/qemu/linux-headers -I/home/ehabko= st/rh/proj/virt/qemu/tcg -I/home/ehabkost/rh/proj/virt/qemu/tcg/i386 -Werr= or -fPIE -DPIE -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_LARGEFILE_SOU= RCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wm= issing-prototypes -fno-strict-aliasing -fstack-protector-all -Wendif-label= s -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -W= format-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-s= tyle-definition -Wtype-limits -I/usr/include/pixman-1 -DHAS_AUDIO -DHAS_A= UDIO_CHOICE -I/home/ehabkost/rh/proj/virt/qemu/hw/i386 -Ihw/i386 -I../linu= x-headers -I.. -I/home/ehabkost/rh/proj/virt/qemu/target-i386 -DNEED_CPU_H = -I/home/ehabkost/rh/proj/virt/qemu/include -pthread -I/usr/include/glib-2.0= -I/usr/lib64/glib-2.0/include -MMD -MP -MT hw/i386/pc.o -MF hw/i386/pc.d= -O2 -D_FORTIFY_SOURCE=3D2 -g -c -o hw/i386/pc.o /home/ehabkost/rh/proj/vi= rt/qemu/hw/i386/pc.c > /home/ehabkost/rh/proj/virt/qemu/hw/i386/pc.c: In function =E2=80=98pc_cp= us_init=E2=80=99: > /home/ehabkost/rh/proj/virt/qemu/hw/i386/pc.c:948:17: error: =E2=80=98cpu= =E2=80=99 may be used uninitialized in this function [-Werror=3Dmaybe-unini= tialized] > cc1: all warnings being treated as errors > make[1]: *** [hw/i386/pc.o] Error 1 I've tested it --enable-debug with which it compiles ok even wit --enable-werror. Thanks for finding it out though, I've updated https://github.com/imammedo/qemu/tree/cpu_add.v2 and https://github.com/imammedo/qemu/tree/cpu_set.WIP with a fix and will post fixed patch as reply to original one. >=20 >=20 > > } > > =20 >=20 > --=20 > Eduardo --=20 Regards, Igor