qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH] apic creation should not depend on pci


From: Jan Kiszka
Subject: [Qemu-devel] Re: [PATCH] apic creation should not depend on pci
Date: Sun, 07 Jun 2009 13:01:54 +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:
> Anybody knows why it currently does?
> 
> Signed-off-by: Gleb Natapov <address@hidden>
> diff --git a/hw/pc.c b/hw/pc.c
> index 0934778..15c3efe 100644
> --- a/hw/pc.c
> +++ b/hw/pc.c
> @@ -881,11 +881,9 @@ static void pc_init1(ram_addr_t ram_size,
>          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) {
>              apic_init(env);
>          }
> +        qemu_register_reset(main_cpu_reset, 0, env);
>      }
>  
>      vmport_init();

!pci_enabled means isapc, and that was probably once defined as "shall
have no external APIC".

But I wonder if we should change this test into "(env->cpuid_features &
CPUID_APIC) || smp_cpus > 1", ie. also include isapc with LAPIC CPU
(probably a synthetic case, but a selectable one) and non-LAPIC CPU with
external APIC (for SMP).

I also wonder if that explicit setting of CPUID_APIC for smp_cpus > 1 is
correct. Either the selected CPU type has one, then it's set via
PPRO_FEATURES, or not - then it could still exist externally for SMP,
see above.

Does this make some sense?

Jan

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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