qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] ARM: ACPI: Fix MPIDR value in ACPI table
@ 2015-10-31  9:50 Shannon Zhao
  2015-10-31 18:53 ` [Qemu-devel] [Qemu-arm] " Peter Crosthwaite
  2015-11-03 13:32 ` [Qemu-devel] " Peter Maydell
  0 siblings, 2 replies; 6+ messages in thread
From: Shannon Zhao @ 2015-10-31  9:50 UTC (permalink / raw)
  To: qemu-arm, peter.maydell; +Cc: shannon.zhao, qemu-devel, peter.huangpeng

From: Shannon Zhao <shannon.zhao@linaro.org>

Use mp_affinity of ARMCPU as the CPU MPIDR instead of the CPU index.

Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
---
This patch is based on below patch.
http://lists.nongnu.org/archive/html/qemu-devel/2015-10/msg06919.html

 hw/arm/virt-acpi-build.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index 29a1980..1c621cb 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -451,13 +451,15 @@ build_madt(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info,
     for (i = 0; i < guest_info->smp_cpus; i++) {
         AcpiMadtGenericInterrupt *gicc = acpi_data_push(table_data,
                                                      sizeof *gicc);
+        ARMCPU *armcpu = ARM_CPU(qemu_get_cpu(i));
+
         gicc->type = ACPI_APIC_GENERIC_INTERRUPT;
         gicc->length = sizeof(*gicc);
         if (guest_info->gic_version == 2) {
             gicc->base_address = memmap[VIRT_GIC_CPU].base;
         }
         gicc->cpu_interface_number = i;
-        gicc->arm_mpidr = i;
+        gicc->arm_mpidr = armcpu->mp_affinity;
         gicc->uid = i;
         if (test_bit(i, cpuinfo->found_cpus)) {
             gicc->flags = cpu_to_le32(ACPI_GICC_ENABLED);
-- 
2.0.4

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

end of thread, other threads:[~2015-11-03 13:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-31  9:50 [Qemu-devel] [PATCH] ARM: ACPI: Fix MPIDR value in ACPI table Shannon Zhao
2015-10-31 18:53 ` [Qemu-devel] [Qemu-arm] " Peter Crosthwaite
2015-11-01  0:04   ` Peter Maydell
2015-11-03  4:33     ` Peter Crosthwaite
2015-11-03  8:15       ` Peter Maydell
2015-11-03 13:32 ` [Qemu-devel] " Peter Maydell

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).