qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 18/22] target-i386: move APIC to ICC bus


From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH 18/22] target-i386: move APIC to ICC bus
Date: Sat, 6 Apr 2013 00:23:45 +0200

On Fri, 5 Apr 2013 13:15:03 -0300
Eduardo Habkost <address@hidden> 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 = NULL;
> > +    SysBusDevice *ib;
> >  
> >      /* init CPUs */
> >      if (cpu_model == NULL) {
> > @@ -902,14 +907,22 @@ void pc_cpus_init(const char *cpu_model)
> >  #endif
> >      }
> >  
> > +    ib = SYS_BUS_DEVICE(object_resolve_path_type("icc-bridge",
> > +                                                 TYPE_ICC_BRIDGE, NULL));
> > +
> >      for (i = 0; i < smp_cpus; i++) {
> > -        pc_new_cpu(cpu_model, x86_cpu_apic_id_from_index(i), &error);
> > +        cpu = 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);
> > +    }
> 
> GCC doesn't like this:
> 
> make[1]: Entering directory `/home/ehabkost/rh/proj/virt/qemu/x86_64-softmmu'
> cc -I. -I/home/ehabkost/rh/proj/virt/qemu 
> -I/home/ehabkost/rh/proj/virt/qemu/include 
> -I/home/ehabkost/rh/proj/virt/qemu/linux-headers 
> -I/home/ehabkost/rh/proj/virt/qemu/tcg 
> -I/home/ehabkost/rh/proj/virt/qemu/tcg/i386  -Werror -fPIE -DPIE -m64 
> -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes 
> -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes 
> -fno-strict-aliasing  -fstack-protector-all -Wendif-labels 
> -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security 
> -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration 
> -Wold-style-definition -Wtype-limits -I/usr/include/pixman-1   -DHAS_AUDIO 
> -DHAS_AUDIO_CHOICE  -I/home/ehabkost/rh/proj/virt/qemu/hw/i386 -Ihw/i386 
> -I../linux-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=2 -g  -c -o hw/i386/pc.o 
> /home/ehabkost/rh/proj/virt/qemu/hw/i386/pc.c
> /home/ehabkost/rh/proj/virt/qemu/hw/i386/pc.c: In function ‘pc_cpus_init’:
> /home/ehabkost/rh/proj/virt/qemu/hw/i386/pc.c:948:17: error: ‘cpu’ may be 
> used uninitialized in this function [-Werror=maybe-uninitialized]
> 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.

> 
> 
> >  }
> >  
> 
> -- 
> Eduardo


-- 
Regards,
  Igor



reply via email to

[Prev in Thread] Current Thread [Next in Thread]