From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MDG8o-0000OG-LX for qemu-devel@nongnu.org; Sun, 07 Jun 2009 07:02:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MDG8j-0000HT-8T for qemu-devel@nongnu.org; Sun, 07 Jun 2009 07:02:17 -0400 Received: from [199.232.76.173] (port=36709 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDG8i-0000Gs-TE for qemu-devel@nongnu.org; Sun, 07 Jun 2009 07:02:12 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:54432) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MDG8i-0001cB-5I for qemu-devel@nongnu.org; Sun, 07 Jun 2009 07:02:12 -0400 Message-ID: <4A2B9E22.8000109@web.de> Date: Sun, 07 Jun 2009 13:01:54 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <20090607100346.GB29048@redhat.com> In-Reply-To: <20090607100346.GB29048@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig13ADD0F333D0E009DD7CD9CC" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH] apic creation should not depend on pci List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gleb Natapov Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig13ADD0F333D0E009DD7CD9CC Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Gleb Natapov wrote: > Anybody knows why it currently does? >=20 > Signed-off-by: Gleb Natapov > 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 |=3D CPUID_APIC; > - } > - qemu_register_reset(main_cpu_reset, 0, env); > - if (pci_enabled) { > apic_init(env); > } > + qemu_register_reset(main_cpu_reset, 0, env); > } > =20 > 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 --------------enig13ADD0F333D0E009DD7CD9CC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkornjIACgkQniDOoMHTA+kKeQCdEq0+MWBVN6IV3yReINp8ROnV iv4AnjnUnavmo8jb2fhFJrdwr/RncfV3 =VEkP -----END PGP SIGNATURE----- --------------enig13ADD0F333D0E009DD7CD9CC--