Received: from eggs.gnu.org ([2001:4830:134:3::10]:53444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YV4UK-0001UK-PX for qemu-devel@nongnu.org; Mon, 09 Mar 2015 16:41:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YV4UF-0006sc-SQ for qemu-devel@nongnu.org; Mon, 09 Mar 2015 16:41:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YV4UF-0006rU-LV for qemu-devel@nongnu.org; Mon, 09 Mar 2015 16:41:15 -0400 From: Eduardo Habkost Date: Mon, 9 Mar 2015 17:40:48 -0300 Message-Id: <1425933651-20736-5-git-send-email-ehabkost@redhat.com> In-Reply-To: <1425933651-20736-1-git-send-email-ehabkost@redhat.com> References: <1425933651-20736-1-git-send-email-ehabkost@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 4/7] target-i386: Remove unused APIC ID default code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Paolo Bonzini , =?UTF-8?q?Andreas=20F=C3=A4rber?= , qemu-devel@nongnu.org The existing apic_id =3D cpu_index code has no visible effect: the PC cod= e already initializes the APIC ID according to the topology on pc_new_cpu(), and linux-user memcpy()s the CPU state (including cpuid_apic_id) on cpu_copy(). Remove the dead code and simply let APIC ID to to be 0 by default. This doesn't change behavior of PC because apic-id is already explicitly set, and doesn't affect linux-user because APIC ID was already always 0. Reviewed-by: Paolo Bonzini Reviewed-by: Andreas F=C3=A4rber Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 2f3a450..3e1a0e7 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -2901,7 +2901,6 @@ static void x86_cpu_initfn(Object *obj) NULL, NULL, (void *)cpu->filtered_features, NULL= ); =20 cpu->hyperv_spinlock_attempts =3D HYPERV_SPINLOCK_NEVER_RETRY; - env->cpuid_apic_id =3D x86_cpu_apic_id_from_index(cs->cpu_index); =20 x86_cpu_load_def(cpu, xcc->cpu_def, &error_abort); =20 --=20 2.1.0