All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] apic creation should not depend on pci
Date: Sun, 7 Jun 2009 14:20:54 +0300	[thread overview]
Message-ID: <20090607112054.GC29048@redhat.com> (raw)
In-Reply-To: <4A2B9E22.8000109@web.de>

On Sun, Jun 07, 2009 at 01:01:54PM +0200, Jan Kiszka wrote:
> Gleb Natapov wrote:
> > Anybody knows why it currently does?
> > 
> > Signed-off-by: Gleb Natapov <gleb@redhat.com>
> > 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).
> 
Using (env->cpuid_features & CPUID_APIC) is definitely more correct that
what is there now.

> 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.
How software detects presence of apic on 486 smp boards? MPtable? 

> 
> Does this make some sense?
> 
Yes (for me at least).

--
			Gleb.

      reply	other threads:[~2009-06-07 11:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-07 10:03 [Qemu-devel] [PATCH] apic creation should not depend on pci Gleb Natapov
2009-06-07 11:01 ` [Qemu-devel] " Jan Kiszka
2009-06-07 11:20   ` Gleb Natapov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090607112054.GC29048@redhat.com \
    --to=gleb@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.