[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH v2] Apic creation should not depend on pci
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] Re: [PATCH v2] Apic creation should not depend on pci |
Date: |
Mon, 08 Jun 2009 16:03:19 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
Gleb Natapov wrote:
>
> It should depend on whether cpu has APIC.
>
> Signed-off-by: Gleb Natapov <address@hidden>
> diff --git a/hw/pc.c b/hw/pc.c
> index 0934778..cb49772 100644
> --- a/hw/pc.c
> +++ b/hw/pc.c
> @@ -878,14 +878,10 @@ static void pc_init1(ram_addr_t ram_size,
> }
> if (i != 0)
> env->halted = 1;
> - if (smp_cpus > 1) {
> - /* XXX: enable it in all cases */
> - env->cpuid_features |= CPUID_APIC;
> - }
> - qemu_register_reset(main_cpu_reset, 0, env);
> - if (pci_enabled) {
> + if ((env->cpuid_features & CPUID_APIC) || smp_cpus > 1) {
Obviously :), I'm fine with that change. Needs testing, though. What
scenarios did you already check?
> apic_init(env);
> }
> + qemu_register_reset(main_cpu_reset, 0, env);
But this line silently reorders CPU and APIC reset handlers. If you did
it intentionally (I vaguely recall it may have some benefit /wrt KVM
synchronizing kernel and user space states), I would suggest pushing it
as a separate patch.
> }
>
> vmport_init();
> --
> Gleb.
>
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux