Re: [Qemu-devel] [PATCH qom-next 11/12] target-i386: initialize APIC at CPU level

2012-05-30 Thread Igor Mammedov
On 05/30/2012 04:55 PM, Jan Kiszka wrote: On 2012-05-30 16:52, Igor Mammedov wrote: On 05/30/2012 04:38 PM, Jan Kiszka wrote: On 2012-05-30 16:27, Igor Mammedov wrote: + +#ifndef CONFIG_USER_ONLY +#define MSI_ADDR_BASE 0xfee0 + +static void x86_cpu_apic_init(X86CPU *cpu, Error **errp) +{ +

Re: [Qemu-devel] [PATCH qom-next 11/12] target-i386: initialize APIC at CPU level

2012-05-30 Thread Jan Kiszka
On 2012-05-30 16:52, Igor Mammedov wrote: > On 05/30/2012 04:38 PM, Jan Kiszka wrote: >> On 2012-05-30 16:27, Igor Mammedov wrote: > + > +#ifndef CONFIG_USER_ONLY > +#define MSI_ADDR_BASE 0xfee0 > + > +static void x86_cpu_apic_init(X86CPU *cpu, Error **errp) > +{ > +

Re: [Qemu-devel] [PATCH qom-next 11/12] target-i386: initialize APIC at CPU level

2012-05-30 Thread Igor Mammedov
On 05/30/2012 04:38 PM, Jan Kiszka wrote: On 2012-05-30 16:27, Igor Mammedov wrote: + +#ifndef CONFIG_USER_ONLY +#define MSI_ADDR_BASE 0xfee0 + +static void x86_cpu_apic_init(X86CPU *cpu, Error **errp) +{ +static int apic_mapped; +CPUX86State *env =&cpu->env; + +if (env->apic_sta

Re: [Qemu-devel] [PATCH qom-next 11/12] target-i386: initialize APIC at CPU level

2012-05-30 Thread Jan Kiszka
On 2012-05-30 16:27, Igor Mammedov wrote: >>> + >>> +#ifndef CONFIG_USER_ONLY >>> +#define MSI_ADDR_BASE 0xfee0 >>> + >>> +static void x86_cpu_apic_init(X86CPU *cpu, Error **errp) >>> +{ >>> +static int apic_mapped; >>> +CPUX86State *env =&cpu->env; >>> + >>> +if (env->apic_state ==

Re: [Qemu-devel] [PATCH qom-next 11/12] target-i386: initialize APIC at CPU level

2012-05-30 Thread Igor Mammedov
On 05/30/2012 12:41 PM, Jan Kiszka wrote: On 2012-05-30 00:10, Igor Mammedov wrote: (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 is moved into cpu_model

Re: [Qemu-devel] [PATCH qom-next 11/12] target-i386: initialize APIC at CPU level

2012-05-30 Thread Jan Kiszka
On 2012-05-30 00:10, Igor Mammedov wrote: > (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 is moved into > cpu_model property setter. And APIC initializa

[Qemu-devel] [PATCH qom-next 11/12] target-i386: initialize APIC at CPU level

2012-05-29 Thread 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 is moved into cpu_model property setter. And APIC initialization is moved into x86_cpu_apic_init() which is ca