From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsSoU-0004gk-K3 for qemu-devel@nongnu.org; Sat, 31 Oct 2015 05:51:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsSoQ-0002qo-6M for qemu-devel@nongnu.org; Sat, 31 Oct 2015 05:51:06 -0400 From: Shannon Zhao Date: Sat, 31 Oct 2015 17:50:01 +0800 Message-ID: <1446285001-7316-1-git-send-email-zhaoshenglong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH] ARM: ACPI: Fix MPIDR value in ACPI table List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-arm@nongnu.org, peter.maydell@linaro.org Cc: shannon.zhao@linaro.org, qemu-devel@nongnu.org, peter.huangpeng@huawei.com From: Shannon Zhao Use mp_affinity of ARMCPU as the CPU MPIDR instead of the CPU index. Signed-off-by: Shannon Zhao --- 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