qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH v2] Apic creation should not depend on pci
Date: Mon, 08 Jun 2009 16:03:19 +0200	[thread overview]
Message-ID: <4A2D1A27.4080504@siemens.com> (raw)
In-Reply-To: <20090608125946.GF27210@redhat.com>

Gleb Natapov wrote:
>     
> It should depend on whether cpu has APIC.
> 
> Signed-off-by: Gleb Natapov <gleb@redhat.com>
> 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

  reply	other threads:[~2009-06-08 14:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-08 12:59 [Qemu-devel] [PATCH v2] Apic creation should not depend on pci Gleb Natapov
2009-06-08 14:03 ` Jan Kiszka [this message]
2009-06-08 14:06   ` [Qemu-devel] " Gleb Natapov
2009-06-09  8:14   ` Gleb Natapov
2009-06-09  8:37     ` Jan Kiszka
2009-06-09  8:54       ` Gleb Natapov

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=4A2D1A27.4080504@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=gleb@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).