qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/arm/virt: gicv3: use all target-list bits
@ 2016-06-21 18:58 Andrew Jones
  2016-06-23 11:15 ` Peter Maydell
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Jones @ 2016-06-21 18:58 UTC (permalink / raw)
  To: qemu-devel, qemu-arm; +Cc: peter.maydell

Signed-off-by: Andrew Jones <drjones@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-06-27  8:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-21 18:58 [Qemu-devel] [PATCH] hw/arm/virt: gicv3: use all target-list bits Andrew Jones
2016-06-23 11:15 ` Peter Maydell
2016-06-23 11:50   ` Andrew Jones
2016-06-24 16:03   ` Andrew Jones
2016-06-24 16:15     ` Andrew Jones
2016-06-24 16:41       ` Peter Maydell
2016-06-24 17:22         ` Andrew Jones
2016-06-24 17:27           ` Peter Maydell
2016-06-27  6:41             ` Andrew Jones
2016-06-27  7:51               ` Marc Zyngier
2016-06-27  8:32                 ` Andrew Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).