From patchwork Tue Jun 21 18:58:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 70592 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp2171454qgy; Tue, 21 Jun 2016 11:59:55 -0700 (PDT) X-Received: by 10.200.46.155 with SMTP id h27mr16357438qta.59.1466535595799; Tue, 21 Jun 2016 11:59:55 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 11si1083488qtx.114.2016.06.21.11.59.55 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 21 Jun 2016 11:59:55 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:53727 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFQtv-0004WR-FD for patch@linaro.org; Tue, 21 Jun 2016 14:59:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFQsp-00048N-J2 for qemu-devel@nongnu.org; Tue, 21 Jun 2016 14:58:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFQso-0008Va-NQ for qemu-devel@nongnu.org; Tue, 21 Jun 2016 14:58:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59209) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFQsj-0008Ua-7P; Tue, 21 Jun 2016 14:58:41 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 92FFAC04B313; Tue, 21 Jun 2016 18:58:40 +0000 (UTC) Received: from hawk.localdomain.com (dhcp-1-122.brq.redhat.com [10.34.1.122]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5LIwdTo008136; Tue, 21 Jun 2016 14:58:39 -0400 From: Andrew Jones To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Date: Tue, 21 Jun 2016 20:58:35 +0200 Message-Id: <1466535515-18092-1-git-send-email-drjones@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 21 Jun 2016 18:58:40 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] hw/arm/virt: gicv3: use all target-list bits X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Andrew Jones --- hw/arm/virt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.4.11 diff --git a/hw/arm/virt.c b/hw/arm/virt.c index c5c125e9204a0..53f545921003c 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1271,6 +1271,16 @@ static void machvirt_init(MachineState *machine) } cpuobj = object_new(object_class_get_name(oc)); + /* Adjust MPIDR per the GIC's target-list size. */ + if (gic_version == 3) { + CPUState *cs = CPU(cpuobj); + uint8_t Aff1 = cs->cpu_index / 16; + uint8_t Aff0 = cs->cpu_index % 16; + + object_property_set_int(cpuobj, (Aff1 << ARM_AFF1_SHIFT) | Aff0, + "mp-affinity", NULL); + } + /* Handle any CPU options specified by the user */ cc->parse_features(CPU(cpuobj), cpuopts, &err); g_free(cpuopts);