ARM: ACPI: fix the AML ID format for CPU devices
commitf460be435f8750d5d1484d3d8b9e5b2c334f0e20
authorWei Huang <wei@redhat.com>
Tue, 6 Sep 2016 18:52:17 +0000 (6 19:52 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 6 Sep 2016 18:52:17 +0000 (6 19:52 +0100)
tree97e8f95a988e45658b62becbc6019d605a8c3cfb
parente0fe723c24562c8f909bb40f131bfdbe75650677
ARM: ACPI: fix the AML ID format for CPU devices

Current QEMU will stall guest VM booting under ACPI mode when vcpu count
is >= 12. Analyzing the booting log, it turns out that DSDT table can't
be loaded correctly due to "Invalid character(s) in name (0x62303043),
repaired: [C00*]". This is because existing QEMU uses a lower case AML
ID for CPU devices (e.g. C000, C001, ..., C00a, C00b). The ACPI code
inside guest VM detects this lower case character as an invalid character
(see acpi_ut_valid_acpi_char() in drivers/acpi/acpica/utstring.c file)
and converts it to "*". This causes duplicated IDs (i.e. "C00a" ==>"C00*"
and "C00b" ==> "C00*"). So ACPI refuses to load the table.

This patch fixes the problem by changing the format with a upper case
character. It matches the CPU ID formats used in other parts of QEMU
code.

Reported-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Wei Huang <wei@redhat.com>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Message-id: 1472852809-23042-1-git-send-email-wei@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/virt-acpi-build.c