All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 03/14] ARM: ACPI: fix the AML ID format for CPU devices
Date: Tue,  6 Sep 2016 14:07:56 +0100	[thread overview]
Message-ID: <1473167287-8326-4-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1473167287-8326-1-git-send-email-peter.maydell@linaro.org>

From: Wei Huang <wei@redhat.com>

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index 28fc59c..295ec86 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -53,7 +53,7 @@ static void acpi_dsdt_add_cpus(Aml *scope, int smp_cpus)
     uint16_t i;
 
     for (i = 0; i < smp_cpus; i++) {
-        Aml *dev = aml_device("C%03x", i);
+        Aml *dev = aml_device("C%.03X", i);
         aml_append(dev, aml_name_decl("_HID", aml_string("ACPI0007")));
         aml_append(dev, aml_name_decl("_UID", aml_int(i)));
         aml_append(scope, dev);
-- 
2.7.4

  parent reply	other threads:[~2016-09-06 13:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 13:07 [Qemu-devel] [PULL 00/14] target-arm queue Peter Maydell
2016-09-06 13:07 ` [Qemu-devel] [PULL 01/14] ast2400: add a memory controller device model Peter Maydell
2016-09-06 14:59   ` Peter Maydell
2016-09-06 15:52     ` Cédric Le Goater
2016-09-06 16:07       ` Peter Maydell
2016-09-06 16:21         ` Cédric Le Goater
2016-09-06 13:07 ` [Qemu-devel] [PULL 02/14] target-arm: Fix lpae bit in FSR on an alignment fault Peter Maydell
2016-09-06 13:07 ` Peter Maydell [this message]
2016-09-06 13:07 ` [Qemu-devel] [PULL 04/14] ast2400: rename the Aspeed SoC files to aspeed_soc Peter Maydell
2016-09-06 13:07 ` [Qemu-devel] [PULL 05/14] ast2400: replace ast2400 with aspeed_soc Peter Maydell
2016-09-06 13:07 ` [Qemu-devel] [PULL 06/14] aspeed-soc: provide a framework to add new SoCs Peter Maydell
2016-09-06 18:51   ` Peter Maydell
2016-09-06 13:08 ` [Qemu-devel] [PULL 07/14] palmetto-bmc: rename the Aspeed board file to aspeed.c Peter Maydell
2016-09-06 13:08 ` [Qemu-devel] [PULL 08/14] palmetto-bmc: replace palmetto_bmc with aspeed Peter Maydell
2016-09-06 13:08 ` [Qemu-devel] [PULL 09/14] palmetto-bmc: add board specific configuration Peter Maydell
2016-09-06 13:08 ` [Qemu-devel] [PULL 10/14] hw/misc: use macros to define hw-strap1 register on the AST2400 Aspeed SoC Peter Maydell
2016-09-06 13:08 ` [Qemu-devel] [PULL 11/14] aspeed: add a ast2500 SoC and support to the SCU and SDMC controllers Peter Maydell
2016-09-06 13:08 ` [Qemu-devel] [PULL 12/14] arm: add support for an ast2500 evaluation board Peter Maydell
2016-09-06 13:08 ` [Qemu-devel] [PULL 13/14] palmetto-bmc: remove extra no_sdcard assignement Peter Maydell
2016-09-06 13:08 ` [Qemu-devel] [PULL 14/14] block: m25p80: Fix vmstate structure name Peter Maydell
2016-09-06 14:01 ` [Qemu-devel] [PULL 00/14] target-arm queue no-reply

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=1473167287-8326-4-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.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.