qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-arm] [PATCH] hw/arm/virt: gicv3: use all target-list bits


From: Andrew Jones
Subject: [Qemu-arm] [PATCH] hw/arm/virt: gicv3: use all target-list bits
Date: Tue, 21 Jun 2016 20:58:35 +0200

Signed-off-by: Andrew Jones <address@hidden>
---
 hw/arm/virt.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

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);
-- 
2.4.11




reply via email to

[Prev in Thread] Current Thread [Next in Thread]