* [PATCH 0/3] hw/ppc: Fix --without-default-devices build
@ 2025-05-26 11:23 Philippe Mathieu-Daudé
2025-05-26 11:23 ` [PATCH 1/3] hw/acpi: Build IPMI stubs when ACPI is disabled Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-26 11:23 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Frédéric Barrat, Michael S. Tsirkin,
Nicholas Piggin, Igor Mammedov, Daniel Henrique Barboza, qemu-ppc,
Cédric Le Goater, Ani Sinha, Philippe Mathieu-Daudé
Fix build issue reported by Thomas:
https://lore.kernel.org/qemu-devel/2d6dead5-f56c-43cf-b7d1-9567fef99616@redhat.com/
Philippe Mathieu-Daudé (3):
hw/acpi: Build IPMI stubs when ACPI is disabled
hw/ppc: PowerNV machines expose a I2C bus
hw/ppc: Add stub for pnv_chip_find_core()
hw/ppc/pnv_stub.c | 15 +++++++++++++++
hw/acpi/meson.build | 10 ++++++++--
hw/ppc/Kconfig | 1 +
hw/ppc/meson.build | 3 ++-
4 files changed, 26 insertions(+), 3 deletions(-)
create mode 100644 hw/ppc/pnv_stub.c
--
2.47.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/3] hw/acpi: Build IPMI stubs when ACPI is disabled
2025-05-26 11:23 [PATCH 0/3] hw/ppc: Fix --without-default-devices build Philippe Mathieu-Daudé
@ 2025-05-26 11:23 ` Philippe Mathieu-Daudé
2025-05-26 11:55 ` Thomas Huth
2025-05-26 11:23 ` [PATCH 2/3] hw/ppc: PowerNV machines expose a I2C bus Philippe Mathieu-Daudé
2025-05-26 11:23 ` [PATCH 3/3] hw/ppc: Add stub for pnv_chip_find_core() Philippe Mathieu-Daudé
2 siblings, 1 reply; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-26 11:23 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Frédéric Barrat, Michael S. Tsirkin,
Nicholas Piggin, Igor Mammedov, Daniel Henrique Barboza, qemu-ppc,
Cédric Le Goater, Ani Sinha, Philippe Mathieu-Daudé
When ACPI is disabled, no ACPI code depends on IPMI,
so we don't need the stubs.
We need them when IPMI is enabled and ACPI disabled,
otherwise when using '--without-default-devices' we
get:
Undefined symbols for architecture arm64:
"_build_ipmi_dev_aml", referenced from:
_isa_ipmi_bt_class_init in hw_ipmi_isa_ipmi_bt.c.o
ld: symbol(s) not found for architecture arm64
Split the source set list to avoid a too long line.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/acpi/meson.build | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/hw/acpi/meson.build b/hw/acpi/meson.build
index 73f02b96912..76948cdd00d 100644
--- a/hw/acpi/meson.build
+++ b/hw/acpi/meson.build
@@ -26,12 +26,18 @@ acpi_ss.add(when: 'CONFIG_ACPI_PCIHP', if_false: files('acpi-pci-hotplug-stub.c'
acpi_ss.add(when: 'CONFIG_ACPI_VIOT', if_true: files('viot.c'))
acpi_ss.add(when: 'CONFIG_ACPI_ICH9', if_true: files('ich9.c', 'ich9_tco.c', 'ich9_timer.c'))
acpi_ss.add(when: 'CONFIG_ACPI_ERST', if_true: files('erst.c'))
-acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'), if_false: files('ipmi-stub.c'))
+acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'))
acpi_ss.add(when: 'CONFIG_PC', if_false: files('acpi-x86-stub.c'))
if have_tpm
acpi_ss.add(files('tpm.c'))
endif
-system_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-build-stub.c', 'ghes-stub.c', 'acpi_interface.c'))
+system_ss.add(when: 'CONFIG_ACPI', if_false: files(
+ 'acpi-stub.c',
+ 'acpi_interface.c',
+ 'aml-build-stub.c',
+ 'ghes-stub.c',
+ 'ipmi-stub.c',
+))
system_ss.add(when: 'CONFIG_ACPI_PCI_BRIDGE', if_false: files('pci-bridge-stub.c'))
system_ss.add_all(when: 'CONFIG_ACPI', if_true: acpi_ss)
system_ss.add(files('acpi-qmp-cmds.c'))
--
2.47.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/3] hw/ppc: PowerNV machines expose a I2C bus
2025-05-26 11:23 [PATCH 0/3] hw/ppc: Fix --without-default-devices build Philippe Mathieu-Daudé
2025-05-26 11:23 ` [PATCH 1/3] hw/acpi: Build IPMI stubs when ACPI is disabled Philippe Mathieu-Daudé
@ 2025-05-26 11:23 ` Philippe Mathieu-Daudé
2025-05-26 11:34 ` Thomas Huth
2025-05-26 11:48 ` Cédric Le Goater
2025-05-26 11:23 ` [PATCH 3/3] hw/ppc: Add stub for pnv_chip_find_core() Philippe Mathieu-Daudé
2 siblings, 2 replies; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-26 11:23 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Frédéric Barrat, Michael S. Tsirkin,
Nicholas Piggin, Igor Mammedov, Daniel Henrique Barboza, qemu-ppc,
Cédric Le Goater, Ani Sinha, Philippe Mathieu-Daudé
Since commit 263b81ee15a, PowerNV machines instanciate
a I2C controller, so expose a I2C bus. Express that in
Kconfig, otherwise we get a configure error when trying
to use '--without-default-devices':
The following clauses were found for PCA9552
config PCA9552 depends on I2C
select PCA9552 if POWERNV
Fixes: 263b81ee15a ("ppc/pnv: Add an I2C controller model")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/ppc/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index ced6bbc7404..0d017df83ee 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -29,6 +29,7 @@ config POWERNV
depends on PPC64 && FDT
imply PCI_DEVICES
imply TEST_DEVICES
+ select I2C
select ISA_IPMI_BT
select IPMI_LOCAL
select ISA_BUS
--
2.47.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/3] hw/ppc: Add stub for pnv_chip_find_core()
2025-05-26 11:23 [PATCH 0/3] hw/ppc: Fix --without-default-devices build Philippe Mathieu-Daudé
2025-05-26 11:23 ` [PATCH 1/3] hw/acpi: Build IPMI stubs when ACPI is disabled Philippe Mathieu-Daudé
2025-05-26 11:23 ` [PATCH 2/3] hw/ppc: PowerNV machines expose a I2C bus Philippe Mathieu-Daudé
@ 2025-05-26 11:23 ` Philippe Mathieu-Daudé
2025-05-26 11:48 ` Cédric Le Goater
2 siblings, 1 reply; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-26 11:23 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Frédéric Barrat, Michael S. Tsirkin,
Nicholas Piggin, Igor Mammedov, Daniel Henrique Barboza, qemu-ppc,
Cédric Le Goater, Ani Sinha, Philippe Mathieu-Daudé,
Thomas Huth
Since commit 9808ce6d5cb, building QEMU configured with
'--without-default-devices' fails:
Undefined symbols for architecture arm64:
"_pnv_chip_find_core", referenced from:
_helper_load_sprd in target_ppc_misc_helper.c.o
_helper_store_sprd in target_ppc_misc_helper.c.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1
Fix by adding a stub when CONFIG_POWERNV is not available.
Reported-by: Thomas Huth <thuth@redhat.com>
Fixes: 9808ce6d5cb ("target/ppc: Big-core scratch register fix")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/ppc/pnv_stub.c | 15 +++++++++++++++
hw/ppc/meson.build | 3 ++-
2 files changed, 17 insertions(+), 1 deletion(-)
create mode 100644 hw/ppc/pnv_stub.c
diff --git a/hw/ppc/pnv_stub.c b/hw/ppc/pnv_stub.c
new file mode 100644
index 00000000000..8d11c8b65bb
--- /dev/null
+++ b/hw/ppc/pnv_stub.c
@@ -0,0 +1,15 @@
+/*
+ * QEMU PowerPC PowerNV stubs
+ *
+ * Copyright (c) Linaro
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "hw/ppc/pnv.h"
+
+PnvCore *pnv_chip_find_core(PnvChip *chip, uint32_t core_id)
+{
+ g_assert_not_reached();
+}
diff --git a/hw/ppc/meson.build b/hw/ppc/meson.build
index 9893f8adebb..02f248f5f46 100644
--- a/hw/ppc/meson.build
+++ b/hw/ppc/meson.build
@@ -55,7 +55,8 @@ ppc_ss.add(when: 'CONFIG_POWERNV', if_true: files(
'pnv_pnor.c',
'pnv_nest_pervasive.c',
'pnv_n1_chiplet.c',
-))
+), if_false: files('pnv_stub.c'))
+
# PowerPC 4xx boards
ppc_ss.add(when: 'CONFIG_PPC440', if_true: files(
'ppc440_bamboo.c',
--
2.47.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] hw/ppc: PowerNV machines expose a I2C bus
2025-05-26 11:23 ` [PATCH 2/3] hw/ppc: PowerNV machines expose a I2C bus Philippe Mathieu-Daudé
@ 2025-05-26 11:34 ` Thomas Huth
2025-05-26 11:48 ` Cédric Le Goater
1 sibling, 0 replies; 16+ messages in thread
From: Thomas Huth @ 2025-05-26 11:34 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Paolo Bonzini, Frédéric Barrat, Michael S. Tsirkin,
Nicholas Piggin, Igor Mammedov, Daniel Henrique Barboza, qemu-ppc,
Cédric Le Goater, Ani Sinha
On 26/05/2025 13.23, Philippe Mathieu-Daudé wrote:
> Since commit 263b81ee15a, PowerNV machines instanciate
> a I2C controller, so expose a I2C bus. Express that in
> Kconfig, otherwise we get a configure error when trying
> to use '--without-default-devices':
>
> The following clauses were found for PCA9552
> config PCA9552 depends on I2C
> select PCA9552 if POWERNV
>
> Fixes: 263b81ee15a ("ppc/pnv: Add an I2C controller model")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/ppc/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> index ced6bbc7404..0d017df83ee 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -29,6 +29,7 @@ config POWERNV
> depends on PPC64 && FDT
> imply PCI_DEVICES
> imply TEST_DEVICES
> + select I2C
> select ISA_IPMI_BT
> select IPMI_LOCAL
> select ISA_BUS
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] hw/ppc: Add stub for pnv_chip_find_core()
2025-05-26 11:23 ` [PATCH 3/3] hw/ppc: Add stub for pnv_chip_find_core() Philippe Mathieu-Daudé
@ 2025-05-26 11:48 ` Cédric Le Goater
2025-05-26 11:51 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 16+ messages in thread
From: Cédric Le Goater @ 2025-05-26 11:48 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Paolo Bonzini, Frédéric Barrat, Michael S. Tsirkin,
Nicholas Piggin, Igor Mammedov, Daniel Henrique Barboza, qemu-ppc,
Ani Sinha, Thomas Huth
On 5/26/25 13:23, Philippe Mathieu-Daudé wrote:
> Since commit 9808ce6d5cb, building QEMU configured with
> '--without-default-devices' fails:
>
> Undefined symbols for architecture arm64:
> "_pnv_chip_find_core", referenced from:
> _helper_load_sprd in target_ppc_misc_helper.c.o
> _helper_store_sprd in target_ppc_misc_helper.c.o
> ld: symbol(s) not found for architecture arm64
> clang: error: linker command failed with exit code 1
> > Fix by adding a stub when CONFIG_POWERNV is not available.
The fix would be to add an abstract handler to implement SPRD accesses
on the PowerNV machine.
Thanks,
C.
>
> Reported-by: Thomas Huth <thuth@redhat.com>
> Fixes: 9808ce6d5cb ("target/ppc: Big-core scratch register fix")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/ppc/pnv_stub.c | 15 +++++++++++++++
> hw/ppc/meson.build | 3 ++-
> 2 files changed, 17 insertions(+), 1 deletion(-)
> create mode 100644 hw/ppc/pnv_stub.c
>
> diff --git a/hw/ppc/pnv_stub.c b/hw/ppc/pnv_stub.c
> new file mode 100644
> index 00000000000..8d11c8b65bb
> --- /dev/null
> +++ b/hw/ppc/pnv_stub.c
> @@ -0,0 +1,15 @@
> +/*
> + * QEMU PowerPC PowerNV stubs
> + *
> + * Copyright (c) Linaro
> + *
> + * SPDX-License-Identifier: GPL-2.0-or-later
> + */
> +
> +#include "qemu/osdep.h"
> +#include "hw/ppc/pnv.h"
> +
> +PnvCore *pnv_chip_find_core(PnvChip *chip, uint32_t core_id)
> +{
> + g_assert_not_reached();
> +}
> diff --git a/hw/ppc/meson.build b/hw/ppc/meson.build
> index 9893f8adebb..02f248f5f46 100644
> --- a/hw/ppc/meson.build
> +++ b/hw/ppc/meson.build
> @@ -55,7 +55,8 @@ ppc_ss.add(when: 'CONFIG_POWERNV', if_true: files(
> 'pnv_pnor.c',
> 'pnv_nest_pervasive.c',
> 'pnv_n1_chiplet.c',
> -))
> +), if_false: files('pnv_stub.c'))
> +
> # PowerPC 4xx boards
> ppc_ss.add(when: 'CONFIG_PPC440', if_true: files(
> 'ppc440_bamboo.c',
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/3] hw/ppc: PowerNV machines expose a I2C bus
2025-05-26 11:23 ` [PATCH 2/3] hw/ppc: PowerNV machines expose a I2C bus Philippe Mathieu-Daudé
2025-05-26 11:34 ` Thomas Huth
@ 2025-05-26 11:48 ` Cédric Le Goater
1 sibling, 0 replies; 16+ messages in thread
From: Cédric Le Goater @ 2025-05-26 11:48 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Paolo Bonzini, Frédéric Barrat, Michael S. Tsirkin,
Nicholas Piggin, Igor Mammedov, Daniel Henrique Barboza, qemu-ppc,
Ani Sinha
On 5/26/25 13:23, Philippe Mathieu-Daudé wrote:
> Since commit 263b81ee15a, PowerNV machines instanciate
> a I2C controller, so expose a I2C bus. Express that in
> Kconfig, otherwise we get a configure error when trying
> to use '--without-default-devices':
>
> The following clauses were found for PCA9552
> config PCA9552 depends on I2C
> select PCA9552 if POWERNV
>
> Fixes: 263b81ee15a ("ppc/pnv: Add an I2C controller model")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/ppc/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> index ced6bbc7404..0d017df83ee 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -29,6 +29,7 @@ config POWERNV
> depends on PPC64 && FDT
> imply PCI_DEVICES
> imply TEST_DEVICES
> + select I2C
> select ISA_IPMI_BT
> select IPMI_LOCAL
> select ISA_BUS
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Thanks,
C.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] hw/ppc: Add stub for pnv_chip_find_core()
2025-05-26 11:48 ` Cédric Le Goater
@ 2025-05-26 11:51 ` Philippe Mathieu-Daudé
2025-07-13 11:18 ` Michael Tokarev
2025-07-22 18:04 ` Aditya Gupta
0 siblings, 2 replies; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-26 11:51 UTC (permalink / raw)
To: Cédric Le Goater, qemu-devel
Cc: Paolo Bonzini, Frédéric Barrat, Michael S. Tsirkin,
Nicholas Piggin, Igor Mammedov, Daniel Henrique Barboza, qemu-ppc,
Ani Sinha, Thomas Huth, qemu-stable
On 26/5/25 13:48, Cédric Le Goater wrote:
> On 5/26/25 13:23, Philippe Mathieu-Daudé wrote:
>> Since commit 9808ce6d5cb, building QEMU configured with
>> '--without-default-devices' fails:
>>
>> Undefined symbols for architecture arm64:
>> "_pnv_chip_find_core", referenced from:
>> _helper_load_sprd in target_ppc_misc_helper.c.o
>> _helper_store_sprd in target_ppc_misc_helper.c.o
>> ld: symbol(s) not found for architecture arm64
>> clang: error: linker command failed with exit code 1
>> > Fix by adding a stub when CONFIG_POWERNV is not available.
>
> The fix would be to add an abstract handler to implement SPRD accesses
> on the PowerNV machine.
I don't know what "SPRD" is so I'll let someone more familiar with
this area do the proper cleanup.
Regards,
Phil.
>
> Thanks,
>
> C.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/3] hw/acpi: Build IPMI stubs when ACPI is disabled
2025-05-26 11:23 ` [PATCH 1/3] hw/acpi: Build IPMI stubs when ACPI is disabled Philippe Mathieu-Daudé
@ 2025-05-26 11:55 ` Thomas Huth
2025-05-26 11:57 ` Thomas Huth
0 siblings, 1 reply; 16+ messages in thread
From: Thomas Huth @ 2025-05-26 11:55 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Paolo Bonzini, Frédéric Barrat, Michael S. Tsirkin,
Nicholas Piggin, Igor Mammedov, Daniel Henrique Barboza, qemu-ppc,
Cédric Le Goater, Ani Sinha
On 26/05/2025 13.23, Philippe Mathieu-Daudé wrote:
> When ACPI is disabled, no ACPI code depends on IPMI,
> so we don't need the stubs.
>
> We need them when IPMI is enabled and ACPI disabled,
> otherwise when using '--without-default-devices' we
> get:
>
> Undefined symbols for architecture arm64:
> "_build_ipmi_dev_aml", referenced from:
> _isa_ipmi_bt_class_init in hw_ipmi_isa_ipmi_bt.c.o
> ld: symbol(s) not found for architecture arm64
>
> Split the source set list to avoid a too long line.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/acpi/meson.build | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/hw/acpi/meson.build b/hw/acpi/meson.build
> index 73f02b96912..76948cdd00d 100644
> --- a/hw/acpi/meson.build
> +++ b/hw/acpi/meson.build
> @@ -26,12 +26,18 @@ acpi_ss.add(when: 'CONFIG_ACPI_PCIHP', if_false: files('acpi-pci-hotplug-stub.c'
> acpi_ss.add(when: 'CONFIG_ACPI_VIOT', if_true: files('viot.c'))
> acpi_ss.add(when: 'CONFIG_ACPI_ICH9', if_true: files('ich9.c', 'ich9_tco.c', 'ich9_timer.c'))
> acpi_ss.add(when: 'CONFIG_ACPI_ERST', if_true: files('erst.c'))
> -acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'), if_false: files('ipmi-stub.c'))
> +acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'))
> acpi_ss.add(when: 'CONFIG_PC', if_false: files('acpi-x86-stub.c'))
> if have_tpm
> acpi_ss.add(files('tpm.c'))
> endif
> -system_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-build-stub.c', 'ghes-stub.c', 'acpi_interface.c'))
> +system_ss.add(when: 'CONFIG_ACPI', if_false: files(
> + 'acpi-stub.c',
> + 'acpi_interface.c',
While you're at it, I think acpi_interface.c is always needed (it's also
added earlier in this file already when CONFIG_ACPI is enabled), so I think
this should rather go to a separate "system_ss.add(...)" line?
Thomas
> + 'aml-build-stub.c',
> + 'ghes-stub.c',
> + 'ipmi-stub.c',
> +))
> system_ss.add(when: 'CONFIG_ACPI_PCI_BRIDGE', if_false: files('pci-bridge-stub.c'))
> system_ss.add_all(when: 'CONFIG_ACPI', if_true: acpi_ss)
> system_ss.add(files('acpi-qmp-cmds.c'))
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/3] hw/acpi: Build IPMI stubs when ACPI is disabled
2025-05-26 11:55 ` Thomas Huth
@ 2025-05-26 11:57 ` Thomas Huth
0 siblings, 0 replies; 16+ messages in thread
From: Thomas Huth @ 2025-05-26 11:57 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Paolo Bonzini, Frédéric Barrat, Michael S. Tsirkin,
Nicholas Piggin, Igor Mammedov, Daniel Henrique Barboza, qemu-ppc,
Cédric Le Goater, Ani Sinha
On 26/05/2025 13.55, Thomas Huth wrote:
> On 26/05/2025 13.23, Philippe Mathieu-Daudé wrote:
>> When ACPI is disabled, no ACPI code depends on IPMI,
>> so we don't need the stubs.
>>
>> We need them when IPMI is enabled and ACPI disabled,
>> otherwise when using '--without-default-devices' we
>> get:
>>
>> Undefined symbols for architecture arm64:
>> "_build_ipmi_dev_aml", referenced from:
>> _isa_ipmi_bt_class_init in hw_ipmi_isa_ipmi_bt.c.o
>> ld: symbol(s) not found for architecture arm64
>>
>> Split the source set list to avoid a too long line.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>> hw/acpi/meson.build | 10 ++++++++--
>> 1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/acpi/meson.build b/hw/acpi/meson.build
>> index 73f02b96912..76948cdd00d 100644
>> --- a/hw/acpi/meson.build
>> +++ b/hw/acpi/meson.build
>> @@ -26,12 +26,18 @@ acpi_ss.add(when: 'CONFIG_ACPI_PCIHP', if_false:
>> files('acpi-pci-hotplug-stub.c'
>> acpi_ss.add(when: 'CONFIG_ACPI_VIOT', if_true: files('viot.c'))
>> acpi_ss.add(when: 'CONFIG_ACPI_ICH9', if_true: files('ich9.c',
>> 'ich9_tco.c', 'ich9_timer.c'))
>> acpi_ss.add(when: 'CONFIG_ACPI_ERST', if_true: files('erst.c'))
>> -acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'), if_false:
>> files('ipmi-stub.c'))
>> +acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'))
>> acpi_ss.add(when: 'CONFIG_PC', if_false: files('acpi-x86-stub.c'))
>> if have_tpm
>> acpi_ss.add(files('tpm.c'))
>> endif
>> -system_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-
>> build-stub.c', 'ghes-stub.c', 'acpi_interface.c'))
>> +system_ss.add(when: 'CONFIG_ACPI', if_false: files(
>> + 'acpi-stub.c',
>> + 'acpi_interface.c',
>
> While you're at it, I think acpi_interface.c is always needed (it's also
> added earlier in this file already when CONFIG_ACPI is enabled), so I think
> this should rather go to a separate "system_ss.add(...)" line?
Or maybe it could rather get removed from the list here? ... it does not
look like it's really needed for the build at a quick glance...
Thomas
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] hw/ppc: Add stub for pnv_chip_find_core()
2025-05-26 11:51 ` Philippe Mathieu-Daudé
@ 2025-07-13 11:18 ` Michael Tokarev
2025-08-10 8:00 ` Michael Tokarev
2025-07-22 18:04 ` Aditya Gupta
1 sibling, 1 reply; 16+ messages in thread
From: Michael Tokarev @ 2025-07-13 11:18 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Cédric Le Goater, qemu-devel
Cc: Paolo Bonzini, Frédéric Barrat, Michael S. Tsirkin,
Nicholas Piggin, Igor Mammedov, Daniel Henrique Barboza, qemu-ppc,
Ani Sinha, Thomas Huth, qemu-stable
Hi!
Has this change been forgotten?
Thanks,
/mjt
On 26.05.2025 14:51, Philippe Mathieu-Daudé wrote:
> On 26/5/25 13:48, Cédric Le Goater wrote:
>> On 5/26/25 13:23, Philippe Mathieu-Daudé wrote:
>>> Since commit 9808ce6d5cb, building QEMU configured with
>>> '--without-default-devices' fails:
>>>
>>> Undefined symbols for architecture arm64:
>>> "_pnv_chip_find_core", referenced from:
>>> _helper_load_sprd in target_ppc_misc_helper.c.o
>>> _helper_store_sprd in target_ppc_misc_helper.c.o
>>> ld: symbol(s) not found for architecture arm64
>>> clang: error: linker command failed with exit code 1
>>> > Fix by adding a stub when CONFIG_POWERNV is not available.
>>
>> The fix would be to add an abstract handler to implement SPRD accesses
>> on the PowerNV machine.
>
> I don't know what "SPRD" is so I'll let someone more familiar with
> this area do the proper cleanup.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] hw/ppc: Add stub for pnv_chip_find_core()
2025-05-26 11:51 ` Philippe Mathieu-Daudé
2025-07-13 11:18 ` Michael Tokarev
@ 2025-07-22 18:04 ` Aditya Gupta
2025-08-11 8:40 ` Philippe Mathieu-Daudé
1 sibling, 1 reply; 16+ messages in thread
From: Aditya Gupta @ 2025-07-22 18:04 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Cédric Le Goater, qemu-devel
Cc: Paolo Bonzini, Frédéric Barrat, Michael S. Tsirkin,
Nicholas Piggin, Igor Mammedov, Daniel Henrique Barboza, qemu-ppc,
Ani Sinha, Thomas Huth, qemu-stable, Harsh Prateek Bora
Hi Cédric and Philippe,
On 26/05/25 17:21, Philippe Mathieu-Daudé wrote:
> On 26/5/25 13:48, Cédric Le Goater wrote:
>> On 5/26/25 13:23, Philippe Mathieu-Daudé wrote:
>>> Since commit 9808ce6d5cb, building QEMU configured with
>>> '--without-default-devices' fails:
>>>
>>> Undefined symbols for architecture arm64:
>>> "_pnv_chip_find_core", referenced from:
>>> _helper_load_sprd in target_ppc_misc_helper.c.o
>>> _helper_store_sprd in target_ppc_misc_helper.c.o
>>> ld: symbol(s) not found for architecture arm64
>>> clang: error: linker command failed with exit code 1
>>> > Fix by adding a stub when CONFIG_POWERNV is not available.
>>
>> The fix would be to add an abstract handler to implement SPRD accesses
>> on the PowerNV machine.
Is this what you meant by an abstract handler ?
https://github.com/adi-g15-ibm/qemu/commit/0abac37032a5ef66d64a649ce04f24876bf9007d
The thing done, is just to introduce a function pointer in
'PowerPCCPUClass',
namely 'handle_sprd_store' and 'handle_sprd_load'
These will be set in the PNV chip realize path, so now the SPRD code in
target/ppc, will only call this for PowerNV.
Separated the powernv specific code, so target/ppc code doesn't depend
on pnv calls now.
Not well tested, will try somethings.
Thanks,
Aditya Gupta
>
> I don't know what "SPRD" is so I'll let someone more familiar with
> this area do the proper cleanup.
>
> Regards,
>
> Phil.
>
>>
>> Thanks,
>>
>> C.
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] hw/ppc: Add stub for pnv_chip_find_core()
2025-07-13 11:18 ` Michael Tokarev
@ 2025-08-10 8:00 ` Michael Tokarev
2025-08-20 6:52 ` Aditya Gupta
0 siblings, 1 reply; 16+ messages in thread
From: Michael Tokarev @ 2025-08-10 8:00 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Cédric Le Goater, qemu-devel
Cc: Paolo Bonzini, Frédéric Barrat, Michael S. Tsirkin,
Nicholas Piggin, Igor Mammedov, Daniel Henrique Barboza, qemu-ppc,
Ani Sinha, Thomas Huth, qemu-stable
On 13.07.2025 14:18, Michael Tokarev wrote:
> Hi!
>
> Has this change been forgotten?
Another ping?
Or can we assume this change isn't needed anymore? :)
Thanks,
/mjt
> On 26.05.2025 14:51, Philippe Mathieu-Daudé wrote:
>> On 26/5/25 13:48, Cédric Le Goater wrote:
>>> On 5/26/25 13:23, Philippe Mathieu-Daudé wrote:
>>>> Since commit 9808ce6d5cb, building QEMU configured with
>>>> '--without-default-devices' fails:
>>>>
>>>> Undefined symbols for architecture arm64:
>>>> "_pnv_chip_find_core", referenced from:
>>>> _helper_load_sprd in target_ppc_misc_helper.c.o
>>>> _helper_store_sprd in target_ppc_misc_helper.c.o
>>>> ld: symbol(s) not found for architecture arm64
>>>> clang: error: linker command failed with exit code 1
>>>> > Fix by adding a stub when CONFIG_POWERNV is not available.
>>>
>>> The fix would be to add an abstract handler to implement SPRD accesses
>>> on the PowerNV machine.
>>
>> I don't know what "SPRD" is so I'll let someone more familiar with
>> this area do the proper cleanup.
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] hw/ppc: Add stub for pnv_chip_find_core()
2025-07-22 18:04 ` Aditya Gupta
@ 2025-08-11 8:40 ` Philippe Mathieu-Daudé
2025-08-20 12:30 ` Aditya Gupta
0 siblings, 1 reply; 16+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-08-11 8:40 UTC (permalink / raw)
To: Aditya Gupta, Cédric Le Goater, qemu-devel
Cc: Paolo Bonzini, Frédéric Barrat, Michael S. Tsirkin,
Nicholas Piggin, Igor Mammedov, Daniel Henrique Barboza, qemu-ppc,
Ani Sinha, Thomas Huth, qemu-stable, Harsh Prateek Bora
On 22/7/25 20:04, Aditya Gupta wrote:
> Hi Cédric and Philippe,
>
>
> On 26/05/25 17:21, Philippe Mathieu-Daudé wrote:
>> On 26/5/25 13:48, Cédric Le Goater wrote:
>>> On 5/26/25 13:23, Philippe Mathieu-Daudé wrote:
>>>> Since commit 9808ce6d5cb, building QEMU configured with
>>>> '--without-default-devices' fails:
>>>>
>>>> Undefined symbols for architecture arm64:
>>>> "_pnv_chip_find_core", referenced from:
>>>> _helper_load_sprd in target_ppc_misc_helper.c.o
>>>> _helper_store_sprd in target_ppc_misc_helper.c.o
>>>> ld: symbol(s) not found for architecture arm64
>>>> clang: error: linker command failed with exit code 1
>>>> > Fix by adding a stub when CONFIG_POWERNV is not available.
>>>
>>> The fix would be to add an abstract handler to implement SPRD accesses
>>> on the PowerNV machine.
>
>
> Is this what you meant by an abstract handler ?
> https://github.com/adi-g15-ibm/qemu/
> commit/0abac37032a5ef66d64a649ce04f24876bf9007d
I think so.
Avoid using target_ulong if possible (I suppose SPRD only exists on
64-bit CPUs so can be uint64_t).
>
>
> The thing done, is just to introduce a function pointer in
> 'PowerPCCPUClass',
> namely 'handle_sprd_store' and 'handle_sprd_load'
>
>
> These will be set in the PNV chip realize path, so now the SPRD code in
> target/ppc, will only call this for PowerNV.
>
> Separated the powernv specific code, so target/ppc code doesn't depend
> on pnv calls now.
>
>
> Not well tested, will try somethings.
>
>
> Thanks,
>
> Aditya Gupta
>
>
>>
>> I don't know what "SPRD" is so I'll let someone more familiar with
>> this area do the proper cleanup.
>>
>> Regards,
>>
>> Phil.
>>
>>>
>>> Thanks,
>>>
>>> C.
>>
>>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] hw/ppc: Add stub for pnv_chip_find_core()
2025-08-10 8:00 ` Michael Tokarev
@ 2025-08-20 6:52 ` Aditya Gupta
0 siblings, 0 replies; 16+ messages in thread
From: Aditya Gupta @ 2025-08-20 6:52 UTC (permalink / raw)
To: Michael Tokarev, Philippe Mathieu-Daudé,
Cédric Le Goater, qemu-devel
Cc: Paolo Bonzini, Frédéric Barrat, Michael S. Tsirkin,
Nicholas Piggin, Igor Mammedov, Daniel Henrique Barboza, qemu-ppc,
Ani Sinha, Thomas Huth, qemu-stable
On 10/08/25 13:30, Michael Tokarev wrote:
> On 13.07.2025 14:18, Michael Tokarev wrote:
>> Hi!
>>
>> Has this change been forgotten?
>
> Another ping?
>
> Or can we assume this change isn't needed anymore? :)
Thanks for the pings Michael.
About the change, we will post a patch-set soon with the suggested
change by Cedric.
I was on vacation past week, so couldn't see the mails.
Thanks,
- Aditya G
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/3] hw/ppc: Add stub for pnv_chip_find_core()
2025-08-11 8:40 ` Philippe Mathieu-Daudé
@ 2025-08-20 12:30 ` Aditya Gupta
0 siblings, 0 replies; 16+ messages in thread
From: Aditya Gupta @ 2025-08-20 12:30 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Cédric Le Goater, qemu-devel
Cc: Paolo Bonzini, Frédéric Barrat, Michael S. Tsirkin,
Nicholas Piggin, Igor Mammedov, Daniel Henrique Barboza, qemu-ppc,
Ani Sinha, Thomas Huth, qemu-stable, Harsh Prateek Bora,
Michael Tokarev
+Michael
On 11/08/25 14:10, Philippe Mathieu-Daudé wrote:
> On 22/7/25 20:04, Aditya Gupta wrote:
>> Hi Cédric and Philippe,
>>
>>
>> On 26/05/25 17:21, Philippe Mathieu-Daudé wrote:
>>> On 26/5/25 13:48, Cédric Le Goater wrote:
>>>> On 5/26/25 13:23, Philippe Mathieu-Daudé wrote:
>>>>> Since commit 9808ce6d5cb, building QEMU configured with
>>>>> '--without-default-devices' fails:
>>>>>
>>>>> Undefined symbols for architecture arm64:
>>>>> "_pnv_chip_find_core", referenced from:
>>>>> _helper_load_sprd in target_ppc_misc_helper.c.o
>>>>> _helper_store_sprd in target_ppc_misc_helper.c.o
>>>>> ld: symbol(s) not found for architecture arm64
>>>>> clang: error: linker command failed with exit code 1
>>>>> > Fix by adding a stub when CONFIG_POWERNV is not available.
>>>>
>>>> The fix would be to add an abstract handler to implement SPRD accesses
>>>> on the PowerNV machine.
>>
>>
>> Is this what you meant by an abstract handler ?
>> https://github.com/adi-g15-ibm/qemu/
>> commit/0abac37032a5ef66d64a649ce04f24876bf9007d
>
> I think so.
>
> Avoid using target_ulong if possible (I suppose SPRD only exists on
> 64-bit CPUs so can be uint64_t).
Thanks Phil. Posted along with your suggested change:
https://lore.kernel.org/qemu-devel/20250820122516.949766-2-adityag@linux.ibm.com/
Thanks,
- Aditya G
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2025-08-20 12:32 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-26 11:23 [PATCH 0/3] hw/ppc: Fix --without-default-devices build Philippe Mathieu-Daudé
2025-05-26 11:23 ` [PATCH 1/3] hw/acpi: Build IPMI stubs when ACPI is disabled Philippe Mathieu-Daudé
2025-05-26 11:55 ` Thomas Huth
2025-05-26 11:57 ` Thomas Huth
2025-05-26 11:23 ` [PATCH 2/3] hw/ppc: PowerNV machines expose a I2C bus Philippe Mathieu-Daudé
2025-05-26 11:34 ` Thomas Huth
2025-05-26 11:48 ` Cédric Le Goater
2025-05-26 11:23 ` [PATCH 3/3] hw/ppc: Add stub for pnv_chip_find_core() Philippe Mathieu-Daudé
2025-05-26 11:48 ` Cédric Le Goater
2025-05-26 11:51 ` Philippe Mathieu-Daudé
2025-07-13 11:18 ` Michael Tokarev
2025-08-10 8:00 ` Michael Tokarev
2025-08-20 6:52 ` Aditya Gupta
2025-07-22 18:04 ` Aditya Gupta
2025-08-11 8:40 ` Philippe Mathieu-Daudé
2025-08-20 12:30 ` Aditya Gupta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).