All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: qemu-devel@nongnu.org, qemu-arm@nongnu.org
Cc: peter.maydell@linaro.org
Subject: [Qemu-devel] [PATCH] hw/arm/virt: gicv3: use all target-list bits
Date: Tue, 21 Jun 2016 20:58:35 +0200	[thread overview]
Message-ID: <1466535515-18092-1-git-send-email-drjones@redhat.com> (raw)

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

             reply	other threads:[~2016-06-21 18:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21 18:58 Andrew Jones [this message]
2016-06-23 11:15 ` [Qemu-devel] [PATCH] hw/arm/virt: gicv3: use all target-list bits 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  6:41               ` Andrew Jones
2016-06-27  7:51               ` Marc Zyngier
2016-06-27  7:51                 ` Marc Zyngier
2016-06-27  8:32                 ` Andrew Jones
2016-06-27  8:32                   ` Andrew Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1466535515-18092-1-git-send-email-drjones@redhat.com \
    --to=drjones@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.