From nobody Mon Nov 23 04:30:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793503006666308.18332381453763; Sat, 31 Oct 2026 20:16:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xNM3F-00036t-Ao; Sat, 31 Oct 2026 23:16:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xNM3B-00033n-6f; Sat, 31 Oct 2026 23:16:05 -0400 Received: from smtp81.cstnet.cn ([159.226.251.81] helo=cstnet.cn) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1xNM38-0000Jt-Na; Sat, 31 Oct 2026 23:16:04 -0400 Received: from k3-03 (unknown [159.226.43.8]) by APP-03 (Coremail) with SMTP id rQCowAAXJ5jlruZqSD4aAA--.22476S3; Sun, 01 Nov 2026 11:15:52 +0800 (CST) From: Tan Chi To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, pbonzini@redhat.com, palmer@dabbelt.com, alistair.francis@wdc.com, liwei1518@gmail.com, daniel.barboza@oss.qualcomm.com, zhiwei_liu@linux.alibaba.com, chao.liu@processmission.com, Tan Chi Subject: [PATCH 1/5] hw/riscv: Build AIA glue only with APLIC and IMSIC Date: Sun, 1 Nov 2026 11:15:43 +0800 Message-ID: <20261101031547.125591-2-tanchi25@mails.ucas.ac.cn> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261101031547.125591-1-tanchi25@mails.ucas.ac.cn> References: <20261101031547.125591-1-tanchi25@mails.ucas.ac.cn> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: rQCowAAXJ5jlruZqSD4aAA--.22476S3 X-Coremail-Antispam: 1UD129KBjvJXoW7KFyDAFWUtFWUCFyrJryUtrb_yoW8tr1rpF s8GrsayryrJF1Sqa9Ikr1kAFnxJwsxur15Gr4qkw18ArsxArW5Jrsxtw4Y9Fy7JFW0yF4F vFWkGFy5uF45Xw7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUHF14x267AKxVW5JVWrJwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2048vs2IY020E87I2jVAFwI0_Jr4l82xGYIkIc2 x26xkF7I0E14v26r1I6r4UM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0 Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Cr0_Gr1UM2 8EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr1j6F4U JwAac4AC62xK8xCEY4vEwIxC4wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0V AKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1l Ox8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErc IFxwACI402YVCY1x02628vn2kIc2xKxwCY1x0262kKe7AKxVWUtVW8ZwCY02Avz4vE14v_ Gr4l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxV WUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI 7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r 4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI 42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjfU1TmhDUUUU X-Originating-IP: [159.226.43.8] X-CM-SenderInfo: pwdquxrlsvqzpdlo2hpxfd2hldfou0/ Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=159.226.251.81; envelope-from=tanchi25@mails.ucas.ac.cn; helo=cstnet.cn X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1793503020225158500 Content-Type: text/plain; charset="utf-8" hw/riscv/aia.c is built unconditionally, but riscv_create_aia() references the APLIC and IMSIC device implementations, which are only built when their respective Kconfig options are enabled. This causes undefined references to riscv_aplic_create() in minimal RISC-V builds that do not include APLIC. Build aia.c only when both CONFIG_RISCV_APLIC and CONFIG_RISCV_IMSIC are enabled. Move imsic_num_bits() to aia.h as a static inline helper, since it is also used by FDT and ACPI code independently of the AIA device creation helper. Signed-off-by: Tan Chi Reviewed-by: Alistair Francis Reviewed-by: Daniel Henrique Barboza Reviewed-by: Nutty Liu --- hw/riscv/aia.c | 11 ----------- hw/riscv/aia.h | 12 +++++++++++- hw/riscv/meson.build | 3 ++- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/hw/riscv/aia.c b/hw/riscv/aia.c index 56fc064533..4463ea2be8 100644 --- a/hw/riscv/aia.c +++ b/hw/riscv/aia.c @@ -13,17 +13,6 @@ =20 #include "aia.h" =20 -uint32_t imsic_num_bits(uint32_t count) -{ - uint32_t ret =3D 0; - - while (BIT(ret) < count) { - ret++; - } - - return ret; -} - DeviceState *riscv_create_aia(MemoryRegion *container, bool msimode, int aia_guests, uint32_t m_imsic_stride, diff --git a/hw/riscv/aia.h b/hw/riscv/aia.h index 5df3292610..e4dcc5aae0 100644 --- a/hw/riscv/aia.h +++ b/hw/riscv/aia.h @@ -10,8 +10,18 @@ #define HW_RISCV_AIA_H =20 #include "exec/hwaddr.h" +#include "qemu/bitops.h" =20 -uint32_t imsic_num_bits(uint32_t count); +static inline uint32_t imsic_num_bits(uint32_t count) +{ + uint32_t ret =3D 0; + + while (BIT(ret) < count) { + ret++; + } + + return ret; +} =20 DeviceState *riscv_create_aia(MemoryRegion *container, bool msimode, int aia_guests, diff --git a/hw/riscv/meson.build b/hw/riscv/meson.build index 6bdabb9544..957031c07d 100644 --- a/hw/riscv/meson.build +++ b/hw/riscv/meson.build @@ -1,5 +1,6 @@ riscv_ss =3D ss.source_set() -riscv_ss.add(files('aia.c')) +riscv_ss.add(when: ['CONFIG_RISCV_APLIC', 'CONFIG_RISCV_IMSIC'], + if_true: files('aia.c')) riscv_ss.add(files('boot.c')) riscv_ss.add(files('device-common.c')) riscv_ss.add(files('fdt-common.c')) --=20 2.53.0 From nobody Mon Nov 23 04:30:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793503066990682.672643524888; Sat, 31 Oct 2026 20:17:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xNM3E-00034o-1S; Sat, 31 Oct 2026 23:16:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xNM3B-00033k-4r; Sat, 31 Oct 2026 23:16:05 -0400 Received: from smtp81.cstnet.cn ([159.226.251.81] helo=cstnet.cn) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1xNM38-0000Jx-16; Sat, 31 Oct 2026 23:16:04 -0400 Received: from k3-03 (unknown [159.226.43.8]) by APP-03 (Coremail) with SMTP id rQCowAAXJ5jlruZqSD4aAA--.22476S4; Sun, 01 Nov 2026 11:15:54 +0800 (CST) From: Tan Chi To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, pbonzini@redhat.com, palmer@dabbelt.com, alistair.francis@wdc.com, liwei1518@gmail.com, daniel.barboza@oss.qualcomm.com, zhiwei_liu@linux.alibaba.com, chao.liu@processmission.com, Tan Chi Subject: [PATCH 2/5] hw/riscv: Build device-common only for its users Date: Sun, 1 Nov 2026 11:15:44 +0800 Message-ID: <20261101031547.125591-3-tanchi25@mails.ucas.ac.cn> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261101031547.125591-1-tanchi25@mails.ucas.ac.cn> References: <20261101031547.125591-1-tanchi25@mails.ucas.ac.cn> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: rQCowAAXJ5jlruZqSD4aAA--.22476S4 X-Coremail-Antispam: 1UD129KBjvJXoW7KrWfGrWfCF4UtrWrtFy8Grg_yoW8Cw4kpF 45Kw4YkFyrJF1SvwsFvr1kuFWxJwn3Cw45Ar1F9w1DJFsrA3yUAasIya12vr9rZa4kAF4F vFZ5K34rCr45Gw7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUHF14x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2048vs2IY020E87I2jVAFwI0_Jryl82xGYIkIc2 x26xkF7I0E14v26r4j6ryUM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0 Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Cr0_Gr1UM2 8EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr1j6F4U JwAac4AC62xK8xCEY4vEwIxC4wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0V AKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1l Ox8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErc IFxwACI402YVCY1x02628vn2kIc2xKxwCY1x0262kKe7AKxVWUtVW8ZwCY02Avz4vE14v_ Gr4l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxV WUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI 7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r 4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI 42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjTRRrWFUUUUU X-Originating-IP: [159.226.43.8] X-CM-SenderInfo: pwdquxrlsvqzpdlo2hpxfd2hldfou0/ Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=159.226.251.81; envelope-from=tanchi25@mails.ucas.ac.cn; helo=cstnet.cn X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1793503072602154100 Content-Type: text/plain; charset="utf-8" hw/riscv/device-common.c is built unconditionally, although its helpers are only used by the virt and server reference machines. In minimal builds without these machines, device-common.c can reference device implementations that are not built, resulting in an undefined reference to gpex_set_irq_num(). Introduce CONFIG_RISCV_DEVICE_COMMON and select it from the two machines that use these helpers. Build device-common.c only when this option is enabled. Signed-off-by: Tan Chi Reviewed-by: Alistair Francis Reviewed-by: Daniel Henrique Barboza Reviewed-by: Nutty Liu --- hw/riscv/Kconfig | 5 +++++ hw/riscv/meson.build | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/riscv/Kconfig b/hw/riscv/Kconfig index fb05031228..27f03b687c 100644 --- a/hw/riscv/Kconfig +++ b/hw/riscv/Kconfig @@ -7,6 +7,9 @@ config RISCV_NUMA config IBEX bool =20 +config RISCV_DEVICE_COMMON + bool + # RISC-V machines in alphabetical order =20 config MICROCHIP_PFSOC @@ -68,6 +71,7 @@ config RISCV_VIRT select PLATFORM_BUS select ACPI select ACPI_PCI + select RISCV_DEVICE_COMMON =20 config RISCV_SERVER_PLATFORM_REF bool @@ -85,6 +89,7 @@ config RISCV_SERVER_PLATFORM_REF select RISCV_IOMMU select RISCV_NUMA select SERIAL_MM + select RISCV_DEVICE_COMMON =20 config SHAKTI_C bool diff --git a/hw/riscv/meson.build b/hw/riscv/meson.build index 957031c07d..b60108787d 100644 --- a/hw/riscv/meson.build +++ b/hw/riscv/meson.build @@ -2,7 +2,7 @@ riscv_ss =3D ss.source_set() riscv_ss.add(when: ['CONFIG_RISCV_APLIC', 'CONFIG_RISCV_IMSIC'], if_true: files('aia.c')) riscv_ss.add(files('boot.c')) -riscv_ss.add(files('device-common.c')) +riscv_ss.add(when: 'CONFIG_RISCV_DEVICE_COMMON', if_true: files('device-co= mmon.c')) riscv_ss.add(files('fdt-common.c')) riscv_ss.add(when: 'CONFIG_RISCV_NUMA', if_true: files('numa.c')) riscv_ss.add(files('riscv_hart.c')) --=20 2.53.0 From nobody Mon Nov 23 04:30:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793503112322525.7248266922377; Sat, 31 Oct 2026 20:18:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xNM3H-00038X-9U; Sat, 31 Oct 2026 23:16:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xNM3C-00035F-Sm; Sat, 31 Oct 2026 23:16:07 -0400 Received: from smtp81.cstnet.cn ([159.226.251.81] helo=cstnet.cn) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1xNM38-0000K6-B0; Sat, 31 Oct 2026 23:16:06 -0400 Received: from k3-03 (unknown [159.226.43.8]) by APP-03 (Coremail) with SMTP id rQCowAAXJ5jlruZqSD4aAA--.22476S5; Sun, 01 Nov 2026 11:15:56 +0800 (CST) From: Tan Chi To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, pbonzini@redhat.com, palmer@dabbelt.com, alistair.francis@wdc.com, liwei1518@gmail.com, daniel.barboza@oss.qualcomm.com, zhiwei_liu@linux.alibaba.com, chao.liu@processmission.com, Tan Chi Subject: [PATCH 3/5] hw/riscv: Move platform bus FDT creation to machine code Date: Sun, 1 Nov 2026 11:15:45 +0800 Message-ID: <20261101031547.125591-4-tanchi25@mails.ucas.ac.cn> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261101031547.125591-1-tanchi25@mails.ucas.ac.cn> References: <20261101031547.125591-1-tanchi25@mails.ucas.ac.cn> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: rQCowAAXJ5jlruZqSD4aAA--.22476S5 X-Coremail-Antispam: 1UD129KBjvJXoW3XFyrKry8uFykGrW3uryfJFb_yoWxGw45pF W8CF47ZFW8GF1aga13Aw48XrW3CwsYkr47Xw1xuryIywsrXr43Ja1kt3WUZFy5tFyUAas0 9a1vgry5AF4FgF7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUH214x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2048vs2IY020E87I2jVAFwI0_JrWl82xGYIkIc2 x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0 Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j6F4UJw A2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4UJVWx Jr1lnxkEFVAIw20F6cxK64vIFxWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2 IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4U McvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I64 8v4I1lFIxGxcIEc7CjxVA2Y2ka0xkIwI1lc7CjxVAaw2AFwI0_Jw0_GFylc2xSY4AK67AK 6r48MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI 0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUtVW8ZwCIc40Y 0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxV W8JVWxJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1l IxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUj6uWPUUUU U== X-Originating-IP: [159.226.43.8] X-CM-SenderInfo: pwdquxrlsvqzpdlo2hpxfd2hldfou0/ Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=159.226.251.81; envelope-from=tanchi25@mails.ucas.ac.cn; helo=cstnet.cn X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1793503115469154100 Content-Type: text/plain; charset="utf-8" riscv_create_fdt_socket_aplic() contains a direct reference to platform_bus_add_all_fdt_nodes(), even though fdt-common.c is built unconditionally and CONFIG_PLATFORM_BUS may be disabled. This causes an undefined reference in minimal RISC-V builds without platform bus support. Move platform bus FDT creation to the virt and server reference machines, which both select CONFIG_PLATFORM_BUS. Export a helper to obtain the APLIC node name and remove the platform bus fields from APLICFdtProps. This removes the dependency from the common APLIC FDT helper while preserving the platform bus interrupt-parent configuration. Signed-off-by: Tan Chi Reviewed-by: Alistair Francis Reviewed-by: Daniel Henrique Barboza Reviewed-by: Nutty Liu --- hw/riscv/fdt-common.c | 13 ++----------- hw/riscv/server_platform_ref.c | 9 +++++++-- hw/riscv/virt.c | 11 +++++++++-- include/hw/riscv/fdt-common.h | 3 +-- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/hw/riscv/fdt-common.c b/hw/riscv/fdt-common.c index ce2dcb43b4..e90502b1bc 100644 --- a/hw/riscv/fdt-common.c +++ b/hw/riscv/fdt-common.c @@ -11,7 +11,6 @@ #include "qemu/error-report.h" #include "system/device_tree.h" #include "hw/core/boards.h" -#include "hw/core/sysbus-fdt.h" #include "hw/riscv/fdt-common.h" #include "target/riscv/cpu_bits.h" #include "hw/riscv/riscv-iommu-bits.h" @@ -599,7 +598,7 @@ void riscv_create_fdt_imsic(void *fdt, IMSICFdtProps *p= rops, } =20 /* Caller must free string after use */ -static char *fdt_get_aplic_nodename(hwaddr aplic_addr) +char *riscv_fdt_get_aplic_nodename(hwaddr aplic_addr) { return g_strdup_printf("/soc/interrupt-controller@%"HWADDR_PRIx, aplic_addr); @@ -613,7 +612,7 @@ static void create_fdt_one_aplic(void *fdt, APLICFdtPro= ps *props, uint32_t aplic_child_phandle, bool m_mode) { - g_autofree char *aplic_name =3D fdt_get_aplic_nodename(aplic_addr); + g_autofree char *aplic_name =3D riscv_fdt_get_aplic_nodename(aplic_add= r); g_autofree uint32_t *aplic_cells =3D g_new0(uint32_t, props->num_harts= * 2); static const char * const aplic_compat[2] =3D { "qemu,aplic", "riscv,aplic" @@ -695,14 +694,6 @@ void riscv_create_fdt_socket_aplic(void *fdt, APLICFdt= Props *props, aplic_s_phandle, 0, false); =20 - if (!props->socket && props->platform_bus_irq) { - g_autofree char *aplic_name =3D fdt_get_aplic_nodename(aplic_addr); - platform_bus_add_all_fdt_nodes(fdt, aplic_name, - props->platform_bus->base, - props->platform_bus->size, - props->platform_bus_irq); - } - aplic_phandles[props->socket] =3D aplic_s_phandle; } =20 diff --git a/hw/riscv/server_platform_ref.c b/hw/riscv/server_platform_ref.c index 5f485b1c79..3526c80d79 100644 --- a/hw/riscv/server_platform_ref.c +++ b/hw/riscv/server_platform_ref.c @@ -192,6 +192,7 @@ static void create_fdt_sockets(RISCVServerRefMachineSta= te *s, { int socket, phandle_pos; MachineState *ms =3D MACHINE(s); + g_autofree char *aplic_name =3D NULL; uint32_t msi_m_phandle =3D 0, msi_s_phandle =3D 0; uint32_t xplic_phandles[MAX_NODES]; g_autofree uint32_t *intc_phandles =3D NULL; @@ -251,8 +252,6 @@ static void create_fdt_sockets(RISCVServerRefMachineSta= te *s, aplic_fdt_props.aplic_m =3D !kvm_enabled() ? &memmap[RVSERVER_APLIC_M] : NULL; aplic_fdt_props.aplic_s =3D &memmap[RVSERVER_APLIC_S]; - aplic_fdt_props.platform_bus =3D &memmap[RVSERVER_PLATFORM_BUS]; - aplic_fdt_props.platform_bus_irq =3D RVSERVER_PLATFORM_BUS_IRQ; aplic_fdt_props.num_harts =3D ms->smp.cpus; aplic_fdt_props.numa_enabled =3D numa_enabled; aplic_fdt_props.irqchip_num_sources =3D RVSERVER_IRQCHIP_NUM_SOURCES; @@ -270,6 +269,12 @@ static void create_fdt_sockets(RISCVServerRefMachineSt= ate *s, xplic_phandles); } =20 + aplic_name =3D riscv_fdt_get_aplic_nodename(memmap[RVSERVER_APLIC_S].b= ase); + platform_bus_add_all_fdt_nodes(ms->fdt, aplic_name, + memmap[RVSERVER_PLATFORM_BUS].base, + memmap[RVSERVER_PLATFORM_BUS].size, + RVSERVER_PLATFORM_BUS_IRQ); + for (socket =3D 0; socket < socket_count; socket++) { if (socket =3D=3D 0) { *irq_mmio_phandle =3D xplic_phandles[socket]; diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index d4b501802f..7ec7596b24 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -290,8 +290,6 @@ static void create_fdt_sockets(RISCVVirtState *s, if (s->aia_type !=3D VIRT_AIA_TYPE_NONE) { aplic_props.aplic_m =3D !kvm_enabled() ? &s->memmap[VIRT_APLIC_M] = : NULL; aplic_props.aplic_s =3D &s->memmap[VIRT_APLIC_S]; - aplic_props.platform_bus =3D &s->memmap[VIRT_PLATFORM_BUS]; - aplic_props.platform_bus_irq =3D VIRT_PLATFORM_BUS_IRQ; aplic_props.socket =3D 0; aplic_props.num_harts =3D ms->smp.cpus; aplic_props.numa_enabled =3D numa_enabled; @@ -347,6 +345,15 @@ static void create_fdt_sockets(RISCVVirtState *s, } } =20 + if (s->aia_type !=3D VIRT_AIA_TYPE_NONE) { + g_autofree char *aplic_name =3D + riscv_fdt_get_aplic_nodename(s->memmap[VIRT_APLIC_S].base); + platform_bus_add_all_fdt_nodes(ms->fdt, aplic_name, + s->memmap[VIRT_PLATFORM_BUS].base, + s->memmap[VIRT_PLATFORM_BUS].size, + VIRT_PLATFORM_BUS_IRQ); + } + riscv_socket_fdt_write_distance_matrix(ms); } =20 diff --git a/include/hw/riscv/fdt-common.h b/include/hw/riscv/fdt-common.h index eb9db8278d..b3b14ada0a 100644 --- a/include/hw/riscv/fdt-common.h +++ b/include/hw/riscv/fdt-common.h @@ -54,8 +54,6 @@ typedef struct IMSICFdtProps { typedef struct APLICFdtProps { const MemMapEntry *aplic_m; const MemMapEntry *aplic_s; - const MemMapEntry *platform_bus; - int platform_bus_irq; int socket; int num_harts; bool numa_enabled; @@ -129,6 +127,7 @@ void riscv_create_fdt_socket_aplic(void *fdt, APLICFdtP= rops *props, void riscv_create_fdt_socket_aclint(void *fdt, ACLINTFdtProps *props, uint32_t *intc_phandles); /* Caller must free the returned string. */ +char *riscv_fdt_get_aplic_nodename(hwaddr addr); char *riscv_fdt_get_uart_nodename(hwaddr addr); void riscv_create_fdt_uart(void *fdt, const MemMapEntry *uart_mem, int uart_irq, int aia_type, --=20 2.53.0 From nobody Mon Nov 23 04:30:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793503014446297.47242600485527; Sat, 31 Oct 2026 20:16:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xNM3J-00039b-A8; Sat, 31 Oct 2026 23:16:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xNM3C-00035D-Rm; Sat, 31 Oct 2026 23:16:06 -0400 Received: from smtp81.cstnet.cn ([159.226.251.81] helo=cstnet.cn) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1xNM39-0000KA-D4; Sat, 31 Oct 2026 23:16:06 -0400 Received: from k3-03 (unknown [159.226.43.8]) by APP-03 (Coremail) with SMTP id rQCowAAXJ5jlruZqSD4aAA--.22476S6; Sun, 01 Nov 2026 11:15:57 +0800 (CST) From: Tan Chi To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, pbonzini@redhat.com, palmer@dabbelt.com, alistair.francis@wdc.com, liwei1518@gmail.com, daniel.barboza@oss.qualcomm.com, zhiwei_liu@linux.alibaba.com, chao.liu@processmission.com, Tan Chi Subject: [PATCH 4/5] hw/riscv: Pass socket topology to KVM AIA Date: Sun, 1 Nov 2026 11:15:46 +0800 Message-ID: <20261101031547.125591-5-tanchi25@mails.ucas.ac.cn> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261101031547.125591-1-tanchi25@mails.ucas.ac.cn> References: <20261101031547.125591-1-tanchi25@mails.ucas.ac.cn> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: rQCowAAXJ5jlruZqSD4aAA--.22476S6 X-Coremail-Antispam: 1UD129KBjvJXoW3JF1UCw4ftr17JF1DXF4DCFg_yoW7Aw43pF WrGrsrArWrtFyxXrs3ta1kXF18Jw4jka13J348Xr40yanxKrWru3yq93yjyF1DGFWkAr1Y vF18Cr42y3WSqr7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUHS14x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2048vs2IY020E87I2jVAFwI0_JF0E3s1l82xGYI kIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2 z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j6F 4UJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4U JVWxJr1lnxkEFVAIw20F6cxK64vIFxWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64 xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j 6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI 8I648v4I1lFIxGxcIEc7CjxVA2Y2ka0xkIwI1lc7CjxVAaw2AFwI0_Jw0_GFylc2xSY4AK 67AK6r48MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrV AFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUtVW8ZwCI c40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267 AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_ Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUjahF3 UUUUU== X-Originating-IP: [159.226.43.8] X-CM-SenderInfo: pwdquxrlsvqzpdlo2hpxfd2hldfou0/ Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=159.226.251.81; envelope-from=tanchi25@mails.ucas.ac.cn; helo=cstnet.cn X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1793503020570158500 Content-Type: text/plain; charset="utf-8" KVM AIA initialization uses the RISC-V NUMA helpers to query the socket count and per-socket hart topology. However, KVM support can be enabled without CONFIG_RISCV_NUMA. In this configuration, kvm-cpu.c is built while numa.c is not, resulting in undefined references to riscv_socket_count(), riscv_socket_hart_count() and riscv_socket_first_hartid(). The virt machine already determines the hart topology when initializing its hart arrays. Pass the socket topology directly to KVM AIA instead of querying the NUMA helpers again. This removes the build-time dependency on CONFIG_RISCV_NUMA without changing the IMSIC address configuration. Signed-off-by: Tan Chi Reviewed-by: Alistair Francis Reviewed-by: Daniel Henrique Barboza Reviewed-by: Nutty Liu --- hw/riscv/aia.h | 5 +++++ hw/riscv/virt.c | 10 +++++++++- target/riscv/kvm/kvm-cpu.c | 10 +++++----- target/riscv/kvm/kvm-stub.c | 3 ++- target/riscv/kvm/kvm_riscv.h | 5 ++++- 5 files changed, 25 insertions(+), 8 deletions(-) diff --git a/hw/riscv/aia.h b/hw/riscv/aia.h index e4dcc5aae0..ed9b613f3c 100644 --- a/hw/riscv/aia.h +++ b/hw/riscv/aia.h @@ -12,6 +12,11 @@ #include "exec/hwaddr.h" #include "qemu/bitops.h" =20 +typedef struct RISCVAIASocket { + uint32_t hartid_base; + uint32_t num_harts; +} RISCVAIASocket; + static inline uint32_t imsic_num_bits(uint32_t count) { uint32_t ret =3D 0; diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 7ec7596b24..f1b1353647 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -853,7 +853,15 @@ static void virt_machine_init(MachineState *machine) } =20 if (kvm_enabled() && virt_use_kvm_aia_aplic_imsic(s->aia_type)) { - kvm_riscv_aia_create(machine, IMSIC_MMIO_GROUP_MIN_SHIFT, + g_autofree RISCVAIASocket *aia_sockets =3D + g_new(RISCVAIASocket, socket_count); + for (i =3D 0; i < socket_count; i++) { + aia_sockets[i].hartid_base =3D s->soc[i].hartid_base; + aia_sockets[i].num_harts =3D s->soc[i].num_harts; + } + + kvm_riscv_aia_create(aia_sockets, socket_count, + IMSIC_MMIO_GROUP_MIN_SHIFT, VIRT_IRQCHIP_NUM_SOURCES, VIRT_IRQCHIP_NUM_MS= IS, s->memmap[VIRT_APLIC_S].base, s->memmap[VIRT_IMSIC_S].base, diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c index 45ad5e1525..1a74b9a37e 100644 --- a/target/riscv/kvm/kvm-cpu.c +++ b/target/riscv/kvm/kvm-cpu.c @@ -46,7 +46,7 @@ #include "sbi_ecall_interface.h" #include "chardev/char-fe.h" #include "system/runstate.h" -#include "hw/riscv/numa.h" +#include "hw/riscv/aia.h" =20 #define PR_RISCV_V_SET_CONTROL 69 #define PR_RISCV_V_VSTATE_CTRL_ON 2 @@ -1897,7 +1897,8 @@ void kvm_arch_accel_class_init(ObjectClass *oc) "auto"); } =20 -void kvm_riscv_aia_create(MachineState *machine, uint64_t group_shift, +void kvm_riscv_aia_create(const RISCVAIASocket *sockets, + uint32_t socket_count, uint64_t group_shift, uint64_t aia_irq_num, uint64_t aia_msi_num, uint64_t aplic_base, uint64_t imsic_base, uint64_t guest_num) @@ -1905,7 +1906,6 @@ void kvm_riscv_aia_create(MachineState *machine, uint= 64_t group_shift, int ret, i; int aia_fd =3D -1; uint64_t default_aia_mode; - uint64_t socket_count =3D riscv_socket_count(machine); uint64_t max_hart_per_socket =3D 0; uint64_t socket, base_hart, hart_count, socket_imsic_base, imsic_addr; uint64_t socket_bits, hart_bits, guest_bits; @@ -2006,8 +2006,8 @@ void kvm_riscv_aia_create(MachineState *machine, uint= 64_t group_shift, =20 for (socket =3D 0; socket < socket_count; socket++) { socket_imsic_base =3D imsic_base + socket * (1U << group_shift); - hart_count =3D riscv_socket_hart_count(machine, socket); - base_hart =3D riscv_socket_first_hartid(machine, socket); + hart_count =3D sockets[socket].num_harts; + base_hart =3D sockets[socket].hartid_base; =20 if (max_hart_per_socket < hart_count) { max_hart_per_socket =3D hart_count; diff --git a/target/riscv/kvm/kvm-stub.c b/target/riscv/kvm/kvm-stub.c index 64e39c96d8..f929161628 100644 --- a/target/riscv/kvm/kvm-stub.c +++ b/target/riscv/kvm/kvm-stub.c @@ -9,7 +9,8 @@ #include "qemu/osdep.h" #include "target/riscv/kvm/kvm_riscv.h" =20 -void kvm_riscv_aia_create(MachineState *machine, uint64_t group_shift, +void kvm_riscv_aia_create(const RISCVAIASocket *sockets, + uint32_t socket_count, uint64_t group_shift, uint64_t aia_irq_num, uint64_t aia_msi_num, uint64_t aplic_base, uint64_t imsic_base, uint64_t guest_num) diff --git a/target/riscv/kvm/kvm_riscv.h b/target/riscv/kvm/kvm_riscv.h index aef681f0a2..bad78e28f4 100644 --- a/target/riscv/kvm/kvm_riscv.h +++ b/target/riscv/kvm/kvm_riscv.h @@ -21,6 +21,8 @@ =20 #include "target/riscv/cpu-qom.h" =20 +typedef struct RISCVAIASocket RISCVAIASocket; + void kvm_riscv_reset_vcpu(RISCVCPU *cpu); /** * kvm_riscv_set_irq: @@ -29,7 +31,8 @@ void kvm_riscv_reset_vcpu(RISCVCPU *cpu); * @level: %0 to clear the interrupt, non-zero to set it. */ void kvm_riscv_set_irq(RISCVCPU *cpu, int irq, int level); -void kvm_riscv_aia_create(MachineState *machine, uint64_t group_shift, +void kvm_riscv_aia_create(const RISCVAIASocket *sockets, + uint32_t socket_count, uint64_t group_shift, uint64_t aia_irq_num, uint64_t aia_msi_num, uint64_t aplic_base, uint64_t imsic_base, uint64_t guest_num); --=20 2.53.0 From nobody Mon Nov 23 04:30:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793503037513666.5797989367938; Sat, 31 Oct 2026 20:17:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xNM3E-00035N-Jk; Sat, 31 Oct 2026 23:16:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xNM3A-00033b-QV; Sat, 31 Oct 2026 23:16:04 -0400 Received: from smtp81.cstnet.cn ([159.226.251.81] helo=cstnet.cn) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1xNM37-0000KD-Tq; Sat, 31 Oct 2026 23:16:04 -0400 Received: from k3-03 (unknown [159.226.43.8]) by APP-03 (Coremail) with SMTP id rQCowAAXJ5jlruZqSD4aAA--.22476S7; Sun, 01 Nov 2026 11:15:58 +0800 (CST) From: Tan Chi To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, pbonzini@redhat.com, palmer@dabbelt.com, alistair.francis@wdc.com, liwei1518@gmail.com, daniel.barboza@oss.qualcomm.com, zhiwei_liu@linux.alibaba.com, chao.liu@processmission.com, Tan Chi Subject: [PATCH 5/5] hw/riscv: Select SSI for IBEX Date: Sun, 1 Nov 2026 11:15:47 +0800 Message-ID: <20261101031547.125591-6-tanchi25@mails.ucas.ac.cn> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261101031547.125591-1-tanchi25@mails.ucas.ac.cn> References: <20261101031547.125591-1-tanchi25@mails.ucas.ac.cn> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: rQCowAAXJ5jlruZqSD4aAA--.22476S7 X-Coremail-Antispam: 1UD129KBjvdXoW7Gw47tF13Kw13Zr18Ar15twb_yoWxtwb_Za n5Aw1xXr98CFy3CF1q9r4kXr1YkayFgFyfGr45t345u3W2gr13G3ZrCr4DZr17Ga1UX3s2 vay0yr9rJr1FkjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbL8FF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUAVCq3wA2048vs2 IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28E F7xvwVC0I7IYx2IY67AKxVW8JVW5JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8Jr0_Cr 1UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr1j 6F4UJwAac4AC62xK8xCEY4vEwIxC4wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFc xC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_ Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2 IErcIFxwACI402YVCY1x02628vn2kIc2xKxwCY1x0262kKe7AKxVWUtVW8ZwCY02Avz4vE 14v_Gr4l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67 AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIY rxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_JFI_Gr1lIxAIcVC0I7IYx2IY6xkF7I0E14 v26F4j6r4UJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_ Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUjahF3 UUUUU== X-Originating-IP: [159.226.43.8] X-CM-SenderInfo: pwdquxrlsvqzpdlo2hpxfd2hldfou0/ Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=159.226.251.81; envelope-from=tanchi25@mails.ucas.ac.cn; helo=cstnet.cn X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1793503040039154100 Content-Type: text/plain; charset="utf-8" The Ibex SPI host controller uses the SSI bus infrastructure, but CONFIG_IBEX does not select CONFIG_SSI. This causes undefined references to SSI functions, including ssi_transfer(), when building a minimal RV32 OpenTitan target without default devices. Select SSI from IBEX to ensure that the required bus implementation is built. Signed-off-by: Tan Chi Reviewed-by: Alistair Francis Reviewed-by: Daniel Henrique Barboza Reviewed-by: Nutty Liu --- hw/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/riscv/Kconfig b/hw/riscv/Kconfig index 27f03b687c..d99fee0fd7 100644 --- a/hw/riscv/Kconfig +++ b/hw/riscv/Kconfig @@ -6,6 +6,7 @@ config RISCV_NUMA =20 config IBEX bool + select SSI =20 config RISCV_DEVICE_COMMON bool --=20 2.53.0