From: Tao Cui <cui.tao@linux.dev>
To: Bibo Mao <maobibo@loongson.cn>, Huacai Chen <chenhuacai@kernel.org>
Cc: cui.tao@linux.dev, WANG Xuerui <kernel@xen0n.name>,
Rong Bao <rong.bao@csmantle.top>,
loongarch@lists.linux.dev, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] LoongArch: Fix acpi_package_ids array overflow
Date: Tue, 4 Aug 2026 16:57:27 +0800 [thread overview]
Message-ID: <1793132c-dd25-4ee0-bc66-f3636522164a@linux.dev> (raw)
In-Reply-To: <20260804075719.1137338-1-maobibo@loongson.cn>
在 2026/8/4 15:57, Bibo Mao 写道:
> With LoongArch virt machine, one typical setting is one core per socket,
> there will max 256 sockets on one VM. With PPTT acpi table, array
> acpi_package_ids will be overflowed.
>
> Here change array size of acpi_package_ids with max value of
> MAX_PACKAGES and KVM_MAX_VCPUS.
>
> Fixes: 4e8f58620f67 ("LoongArch: Retrieve CPU package ID from PPTT when available")
> Cc: stable@vger.kernel.org
> Signed-off-by: Bibo Mao <maobibo@loongson.cn>
> ---
> arch/loongarch/kernel/acpi.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/loongarch/kernel/acpi.c b/arch/loongarch/kernel/acpi.c
> index 873e90990771..cb454ee92b20 100644
> --- a/arch/loongarch/kernel/acpi.c
> +++ b/arch/loongarch/kernel/acpi.c
> @@ -13,6 +13,7 @@
> #include <linux/export.h>
> #include <linux/irq.h>
> #include <linux/irqdomain.h>
> +#include <linux/kvm_host.h>
> #include <linux/memblock.h>
> #include <linux/of_fdt.h>
> #include <linux/serial_core.h>
> @@ -202,7 +203,7 @@ static void __init acpi_process_madt(void)
>
> int pptt_enabled;
> static int acpi_nr_packages;
> -static int acpi_package_ids[MAX_PACKAGES];
> +static int acpi_package_ids[MAX(MAX_PACKAGES, KVM_MAX_VCPUS)];
>
> int __init parse_acpi_topology(void)
> {
>
> base-commit: 075b74841bd0065a3bda3440873c747938e69b68
Reviewed-by: Tao Cui <cuitao@kylinos.cn>
next prev parent reply other threads:[~2026-08-04 8:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 7:57 Bibo Mao
2026-08-04 8:57 ` Tao Cui [this message]
2026-08-09 4:07 ` Huacai Chen
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=1793132c-dd25-4ee0-bc66-f3636522164a@linux.dev \
--to=cui.tao@linux.dev \
--cc=chenhuacai@kernel.org \
--cc=kernel@xen0n.name \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=maobibo@loongson.cn \
--cc=rong.bao@csmantle.top \
--cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®