From patchwork Wed Mar 4 02:13:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 446010 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3F88E1401D0 for ; Wed, 4 Mar 2015 13:19:02 +1100 (AEDT) Received: from localhost ([::1]:41648 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSyto-0006Jh-EA for incoming@patchwork.ozlabs.org; Tue, 03 Mar 2015 21:19:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSyrv-0003kC-5x for qemu-devel@nongnu.org; Tue, 03 Mar 2015 21:17:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSyrs-0004Yj-E7 for qemu-devel@nongnu.org; Tue, 03 Mar 2015 21:17:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSyrs-0004Yf-6K for qemu-devel@nongnu.org; Tue, 03 Mar 2015 21:17:00 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t242Gvbf025272 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 3 Mar 2015 21:16:57 -0500 Received: from localhost (ovpn-113-133.phx2.redhat.com [10.3.113.133]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t242GuJG021583; Tue, 3 Mar 2015 21:16:57 -0500 From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Tue, 3 Mar 2015 23:13:41 -0300 Message-Id: <1425435224-2630-3-git-send-email-ehabkost@redhat.com> In-Reply-To: <1425435224-2630-1-git-send-email-ehabkost@redhat.com> References: <1425435224-2630-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gu Zheng , Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Paolo Bonzini Subject: [Qemu-devel] [PATCH v4 2/5] target-i386: Remove unused APIC ID default code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The existing apic_id = cpu_index code has no visible effect: the PC code 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. Signed-off-by: Eduardo Habkost Reviewed-by: Paolo Bonzini Reviewed-by: Andreas Färber --- target-i386/cpu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 8fc5727..05cac57 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -2923,7 +2923,6 @@ static void x86_cpu_initfn(Object *obj) NULL, NULL, (void *)cpu->filtered_features, NULL); cpu->hyperv_spinlock_attempts = HYPERV_SPINLOCK_NEVER_RETRY; - env->cpuid_apic_id = x86_cpu_apic_id_from_index(cs->cpu_index); x86_cpu_load_def(cpu, xcc->cpu_def, &error_abort);