Re: [Qemu-devel] [PATCH] target-i386: initialize APIC at CPU level

2012-10-05 Thread Igor Mammedov
On Thu, 04 Oct 2012 18:15:48 +0200 Andreas Färber wrote: > > +env->apic_state = qdev_create(NULL, apic_type); > > + > > +if (env->apic_state == NULL) { > > +error_set(errp, QERR_DEVICE_INIT_FAILED, apic_type); > > +return; > > +} > > + > > +object_property_add_child

Re: [Qemu-devel] [PATCH] target-i386: initialize APIC at CPU level

2012-10-04 Thread Andreas Färber
Am 04.10.2012 18:31, schrieb Igor Mammedov: > On Thu, 04 Oct 2012 18:15:48 +0200 > Andreas Färber wrote: > >> Am 04.10.2012 16:43, schrieb Igor Mammedov: >>> +static void x86_cpu_apic_init(X86CPU *cpu, Error **errp) >>> +{ >>> +#ifndef CONFIG_USER_ONLY >>> +static int apic_mapped; >>> +CP

Re: [Qemu-devel] [PATCH] target-i386: initialize APIC at CPU level

2012-10-04 Thread Jan Kiszka
On 2012-10-04 16:43, Igor Mammedov wrote: > +/* XXX: mapping more APICs at the same memory location */ > +if (apic_mapped == 0) { > +/* NOTE: the APIC is directly connected to the CPU - it is not > + on the global memory bus. */ > +/* XXX: what if the base changes?

Re: [Qemu-devel] [PATCH] target-i386: initialize APIC at CPU level

2012-10-04 Thread Igor Mammedov
On Thu, 04 Oct 2012 18:15:48 +0200 Andreas Färber wrote: > Am 04.10.2012 16:43, 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 cr

Re: [Qemu-devel] [PATCH] target-i386: initialize APIC at CPU level

2012-10-04 Thread Andreas Färber
Am 04.10.2012 16:43, 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