ppc queue
Subsystems (2)
The following changes since commit b4bdad7dcef623d2874df4e79e0be01075096c3b:
Merge tag 'dump-pr-v1' of https://gitlab.com/marcandre.lureau/qemu into staging (2026-07-02 16:04:08 +0200)
are available in the Git repository at:
https://gitlab.com/harshpb/qemu.git tags/pull-ppc-for-11.1-misc-20260703
for you to fetch changes up to f9d05801eb4acd6402d73cb25d498a2419920cf9:
ppc/pnv: add test to verify external DTB is honored (2026-07-03 10:07:21 +0530)
----------------------------------------------------------------
PPC queue for 2026-07-03
* SLOF FW update to 20260627
* ppc/pnv: external dtb fix and test addition
* PHB code refactor for better maintainability
* Revert deprecation of 405 CPUs
* target/ppc: Expose TB offset of guest in Qemu monitor
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEa4EM1tK+EPOIPSFCRUTplPnWj7sFAmpHPNAACgkQRUTplPnW j7tkjQ/9FP3/sTw0MxhGdLItxurrEzu3f4jiDKpnjEIqiJInzYl/2fJKZU611PSp gydfdNhkr71TxuJggibAosEblcWRq9KqQXysDpNrJ8rqEIeLj0lv9/JigLTZqU3e vsfDmfdCAB7YTtpm6HkTYW81EPD0X8AwQqz4FCNDQ0zeNUBIU8IU/ARP2j80CTnm 5xRK42aZb9CMYYIk3p8l4FuZmv6Y0Jf0daXM4WsEdHu9KjGvYr1glTY/lgblNPug kWIcjPqQ6x/hloYqxTTcsfJBnKfdaVppuh6LbJbgISsQIBzTqrD2HvEIpNFJRKnS 1XGwLj6cMmm4u2tv3BF0yVDJCEff312n2VFskmOrCUJOR+g2UqDzMb4+7JOpufEn Fla38+a9H9ThdnUNaak8+KquHDOJzDAOugOdMvsID8KlJ/q3wrTTEUUImj5Bwyqz Gc7naNx+3D+BSiahDe4LP71ZFLrQJ/eYCj71for5xZNcZVOQ6IDhymEMUAcRzkt6 2qICF6XmkYfuH+1113KMxG65NpKGEvktONQ6UpLWTubQ++BNK1Bt2v8PAWSis/d8 EYg5M/R7RqhbxufIUDLXJIuxB3xuiVg+e+x/M8X0LffmYhPI1cuZPmth4/75IKL+ 9Vddgc1hSHX1EUjRyZpoK6WArOTNvUOZMEcAhGr/0NgK5O/1Z10= =1TRv
-----END PGP SIGNATURE-----
----------------------------------------------------------------
Gautam Menghani (1):
target/ppc: Expose the TB offset of the guest in QEMU monitor
Glenn Miles (1):
Revert "hw/ppc: Deprecate 405 CPUs"
Jishnu Warrier (1):
hw/pci-host: Split PowerNV PHB5 code from PHB4 files
Shivang Upadhyay (2):
ppc/pnv: avoid regenerating DTB if external DTB is present ppc/pnv: add test to verify external DTB is honored
Thomas Huth (2):
pseries: Update SLOF firmware image to release 20260627 docs/system/ppc/pseries: Update the link to the SLOF repository
docs/about/deprecated.rst | 9 ---- docs/system/ppc/pseries.rst | 2 +- target/ppc/cpu.h | 1 + hw/pci-host/pnv_phb4.c | 6 --- hw/pci-host/pnv_phb4_pec.c | 58 ------------------------- hw/pci-host/pnv_phb5.c | 23 ++++++++++ hw/pci-host/pnv_phb5_pec.c | 77 +++++++++++++++++++++++++++++++++ hw/ppc/pnv.c | 10 +++-- hw/ppc/ppc.c | 5 +++ target/ppc/cpu_init.c | 5 ++- hw/pci-host/meson.build | 2 + pc-bios/README | 2 +- pc-bios/slof.bin | Bin 994176 -> 997576 bytes roms/SLOF | 2 +- tests/functional/ppc64/test_powernv.py | 19 ++++++++ 15 files changed, 140 insertions(+), 81 deletions(-) create mode 100644 hw/pci-host/pnv_phb5.c create mode 100644 hw/pci-host/pnv_phb5_pec.c
[PULL 2/7] Revert "hw/ppc: Deprecate 405 CPUs"
From: Glenn Miles <[email protected]>
This reverts commit 52f0b59ec6b780f2a3e162d5862b90b406fa4697.
The PowerPC 405 CPU is used by the PPE42 CPU which was added to QEMU v10.2. The PPE42 CPU is basically a stripped down version of the PowerPC 405 CPU and is used by the Power9, Power10, and Power11 CPUs as an embedded processor to handle various tasks. Also, IBM has plans to use the PowerPC 405 CPU model within a year to model the On Chip Controller (OCC), which has an embedded PPC405 CPU. Therefore, this patch removes the PowerPC 405 CPU from the deprecated list.
--- docs/about/deprecated.rst | 9 --------- 1 file changed, 9 deletions(-)
docs/about/deprecated.rst +0 -9
@@ -206,15 +206,6 @@ in the QEMU object model anymore. ``Sun-UltraSparc-IIIi+`` and but for consistency these will get removed in a future release, too. Use ``Sun-UltraSparc-IIIi-plus`` and ``Sun-UltraSparc-IV-plus`` instead. -PPC 405 CPUs (since 10.0) -''''''''''''''''''''''''' - -The PPC 405 CPU has no known users and the ``ref405ep`` machine was -removed in QEMU 10.0. Since the IBM POWER [8-11] processors uses an -embedded 405 for power management (OCC) and other internal tasks, it -is theoretically possible to use QEMU to model them. Let's keep the -CPU implementation for a while before removing all support. - Power8E and Power8NVL CPUs and corresponding Pnv chips (since 10.1) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Signature · 1 line
2.52.0
[PULL 6/7] ppc/pnv: avoid regenerating DTB if external DTB is present
In reply to Harsh Prateek BoraFrom: Shivang Upadhyay <[email protected]>
Currently externally provided dtb is overwritten in pnv_reset. Fix this by only creating dtb if not provided from -dtb.
--- hw/ppc/pnv.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
hw/ppc/pnv.c +7 -3
@@ -803,9 +803,13 @@ static void pnv_reset(MachineState *machine, ResetType type) mpipl_write_succeeded =do_mpipl_write (pnv); } -/* Regenerate device tree */ - fdt =pnv_dt_create (machine); -_FDT ((fdt_pack (fdt))); +/* Only create new dt if not provided in -dtb */ +if (!machine->dtb) { + fdt =pnv_dt_create (machine); +_FDT ((fdt_pack (fdt))); + }else { + fdt = machine->fdt; + }/* * If it's a MPIPL boot, add the "mpipl-boot" property, and reset the
Signature · 1 line
2.52.0
[PULL 3/7] hw/pci-host: Split PowerNV PHB5 code from PHB4 files
In reply to Harsh Prateek BoraFrom: Jishnu Warrier <[email protected]>
Separate Power10/11 PHB5 implementation from Power9 PHB4 code for better maintainability and clarity. This is a pure code movement with no functional changes.
--- hw/pci-host/pnv_phb4.c | 6 --- hw/pci-host/pnv_phb4_pec.c | 58 ---------------------------- hw/pci-host/pnv_phb5.c | 23 ++++++++++++ hw/pci-host/pnv_phb5_pec.c | 77 ++++++++++++++++++++++++++++++++++++++ hw/pci-host/meson.build | 2 + 5 files changed, 102 insertions(+), 64 deletions(-) create mode 100644 hw/pci-host/pnv_phb5.c create mode 100644 hw/pci-host/pnv_phb5_pec.c
hw/pci-host/pnv_phb4.c +0 -6
@@ -1721,11 +1721,6 @@ static const TypeInfo pnv_phb4_type_info = { } }; -static const TypeInfo pnv_phb5_type_info = { - .name =TYPE_PNV_PHB5 , - .parent =TYPE_PNV_PHB4 , - .instance_size =sizeof (PnvPHB4), -}; static void pnv_phb4_root_bus_get_prop(Object *obj, Visitor *v, const char *name,
@@ -1794,7 +1789,6 @@ static void pnv_phb4_register_types(void) {type_register_static (&pnv_phb4_root_bus_info);type_register_static (&pnv_phb4_type_info); -type_register_static (&pnv_phb5_type_info);type_register_static (&pnv_phb4_iommu_memory_region_info); }
hw/pci-host/pnv_phb4_pec.c +0 -58
67 lines not on this page · raw message
hw/pci-host/pnv_phb5.c new file +23 -0
@@ -0,0 +1,23 @@ +/* +* QEMU PowerPC PowerNV (POWER10) PHB5 model +* +* Copyright (c) 2018-2026, IBM Corporation. +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "qemu/osdep.h" +#include "hw/pci-host/pnv_phb4.h" + +static const TypeInfo pnv_phb5_type_info = { + .name =TYPE_PNV_PHB5 , + .parent =TYPE_PNV_PHB4 , + .instance_size =sizeof (PnvPHB4), +}; + +static void pnv_phb5_register_types (void ) +{ +type_register_static (&pnv_phb5_type_info); +} + +type_init (pnv_phb5_register_types);
hw/pci-host/pnv_phb5_pec.c new file +77 -0
77 lines not on this page · raw message
hw/pci-host/meson.build +2 -0
@@ -44,5 +44,7 @@ specific_ss.add(when: 'CONFIG_PCI_POWERNV', if_true: files( 'pnv_phb3_pbcq.c', 'pnv_phb4.c', 'pnv_phb4_pec.c', + 'pnv_phb5.c', + 'pnv_phb5_pec.c', 'pnv_phb.c', ))
Signature · 1 line
2.52.0
[PULL 4/7] target/ppc: Expose the TB offset of the guest in QEMU monitor
In reply to Harsh Prateek BoraFrom: Gautam Menghani <[email protected]>
When debugging issues in KVM guests, it is sometimes helpful to have a unified trace log of both guest and host to see where things are going wrong. Expose the TB (timebase) offset through QEMU monitor to enable capturing of unified log.
The below steps can be then used for KVM guests to get a unified log:
1. In host
trace-cmd record -e kvm_hv:kvm_guest_enter -e kvm_hv:kvm_guest_exit \
-C ppc-tb -o trace_host.dat
2. In guest
trace-cmd record -e powerpc:hcall_entry -e powerpc:hcall_exit -C ppc-tb \
--ts-offset <TB offset from QEMU monitor> -o trace_guest.dat
NOTE: The TB offset would be reported as a negative number in QEMU monitor. For this step, the minus sign must be ignored.
3. Transfer the guest logs to the host with scp/rsync
4. Unify the logs
trace-cmd report -i trace_host.dat -i trace_guest.dat > combined_log
In case of TCG guests, the TB offset would be
reported as 0 since the offset logic is not applicable in this case.
--- target/ppc/cpu.h | 1 + hw/ppc/ppc.c | 5 +++++ target/ppc/cpu_init.c | 5 +++-- 3 files changed, 9 insertions(+), 2 deletions(-)
target/ppc/cpu.h +1 -0
@@ -1693,6 +1693,7 @@ void cpu_ppc_store_hdecr(CPUPPCState *env, target_ulong value);void cpu_ppc_store_tbu40 (CPUPPCState *env,uint64_t value);uint64_t cpu_ppc_load_purr (CPUPPCState *env);void cpu_ppc_store_purr (CPUPPCState *env,uint64_t value); +int64_t cpu_ppc_load_tb_offset (CPUPPCState *env);#if !defined(CONFIG_USER_ONLY )target_ulong load_40x_pit (CPUPPCState *env);void store_40x_pit (CPUPPCState *env,target_ulong val);
hw/ppc/ppc.c +5 -0
@@ -515,6 +515,11 @@ uint64_t cpu_ppc_get_tb(ppc_tb_t *tb_env, uint64_t vmclk, int64_t tb_offset)return ns_to_tb (tb_env->tb_freq, vmclk) + tb_offset; } +int64_t cpu_ppc_load_tb_offset (CPUPPCState *env) +{ +return env->tb_env->tb_offset; +} +uint64_t cpu_ppc_load_tbl (CPUPPCState *env) {ppc_tb_t *tb_env = env->tb_env;
target/ppc/cpu_init.c +3 -2
@@ -7620,8 +7620,9 @@ void ppc_cpu_dump_state(CPUState *cs, FILE *f, int flags)#if !defined(CONFIG_USER_ONLY )if (env->tb_env) {qemu_fprintf (f,"TB %08" PRIu32" %08" PRIu64 -" DECR " TARGET_FMT_lu"\n" ,cpu_ppc_load_tbu (env), -cpu_ppc_load_tbl (env),cpu_ppc_load_decr (env)); +" DECR " TARGET_FMT_lu" TB_OFFSET %016" PRId64"\n" , +cpu_ppc_load_tbu (env),cpu_ppc_load_tbl (env), +cpu_ppc_load_decr (env),cpu_ppc_load_tb_offset (env)); }#else qemu_fprintf(f, "TB %08" PRIu32 " %08" PRIu64 "\n", cpu_ppc_load_tbu(env),
Signature · 1 line
2.52.0
[PULL 1/7] pseries: Update SLOF firmware image to release 20260627
In reply to Harsh Prateek BoraFrom: Thomas Huth <[email protected]>
Contains a fix for the parsing of ELF program headers.
--- pc-bios/README | 2 +- pc-bios/slof.bin | Bin 994176 -> 997576 bytes roms/SLOF | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-)
pc-bios/README +1 -1
@@ -14,7 +14,7 @@ - SLOF (Slimline Open Firmware) is a free IEEE 1275 Open Firmware implementation for certain IBM POWER hardware. The sources are at https://gitlab.com/slof/slof, and the image currently in qemu is - built from git tag qemu-slof-20251026. + built from git tag qemu-slof-20260627. - VOF (Virtual Open Firmware) is a minimalistic firmware to work with -machine pseries,x-vof=on. When enabled, the firmware acts as a slim shim and
pc-bios/slof.bin binary +0 -0
roms/SLOF +1 -1
@@ -1 +1 @@ -Subproject commit b7f755248e2dcc56c02634d288e1c0ff7e0ce1c7 +Subproject commit 47457c9078a217150aa1634f2657e6804fbde467
Signature · 1 line
2.52.0
[PULL 5/7] docs/system/ppc/pseries: Update the link to the SLOF repository
In reply to Harsh Prateek BoraFrom: Thomas Huth <[email protected]>
SLOF has been moved to gitlab.com already a while ago. We updated the link in pc-bios/README in commit 7f98b4f25ed9 ("pseries: Update SLOF firmware image"), but forgot to update it in the manual, too.
--- docs/system/ppc/pseries.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
docs/system/ppc/pseries.rst +1 -1
@@ -43,7 +43,7 @@ Firmware The pSeries platform in QEMU comes with 2 firmwares: -`SLOF <https://github.com/aik/SLOF>`_ (Slimline Open Firmware) is an +`SLOF <https://gitlab.com/slof/slof>`_ (Slimline Open Firmware) is an implementation of the `IEEE 1275-1994, Standard for Boot (Initialization Configuration) Firmware: Core Requirements and Practices <https://standards.ieee.org/standard/1275-1994.html>`_.
Signature · 1 line
2.52.0
[PULL 7/7] ppc/pnv: add test to verify external DTB is honored
In reply to Harsh Prateek BoraFrom: Shivang Upadhyay <[email protected]>
Test boots a powernv11 machine, using a custom dtb. Custom dtb has the following bootargs.
chosen {
bootargs = "hello world";
};Test Checks whether above bootargs make it to kernel's command line.
--- tests/functional/ppc64/test_powernv.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
tests/functional/ppc64/test_powernv.py +19 -0
@@ -27,6 +27,11 @@ class PowernvMachine(LinuxKernelTest): 'buildroot/qemu_ppc64le_powernv8-2025.02/rootfs.ext2'), 'aee2192b692077c4bde31cb56ce474424b358f17cec323d5c94af3970c9aada2') + # testdtb for power11, which contains string "hello world" in command line + ASSET_SAMPLE_DTB = Asset( + ('https://github.com/roz3x/qemu/raw/refs/heads/sample-dtb/qemu-powernv11.dtb'), + 'ea1271516264eea1eb58a067a99d0c2ca9528be8dc7d4e46bb2d5ae0d42fc568') + def do_test_linux_boot(self, command_line = KERNEL_COMMON_COMMAND_LINE): self.require_accelerator("tcg") kernel_path = self.ASSET_KERNEL.fetch()
@@ -104,6 +109,20 @@ def do_test_ppc64_powernv(self, proc): # Device detection output driven by udev probing is sometimes cut off # from console output, suspect S14silence-console init script. + def test_ppc64_powernv_external_dtb(self): + self.set_machine('powernv11') + self.require_accelerator("tcg") + + kernel_path = self.ASSET_KERNEL.fetch() + sample_dtb_path = self.ASSET_SAMPLE_DTB.fetch() + self.vm.set_console() + self.vm.add_args('-kernel', kernel_path, + '-dtb', sample_dtb_path) + self.vm.launch() + + # check if custom dtb is reflected or not + wait_for_console_pattern(self, "Kernel command line: hello world", self.panic_message) + def test_powernv8(self): self.set_machine('powernv8') self.do_test_ppc64_powernv('P8')
Signature · 1 line
2.52.0
Hi Stefan,
I had ran the gitlab CI here:
https://gitlab.com/harshpb/qemu/-/pipelines/2646372305
Checkpatch error for line length exceeding can be ignored. Other failure (migration-compat-aarch64) seems to exist in baseline.
Thanks
Harsh
Quoted 74 lines · Harsh Prateek Bora
The following changes since commit
b4bdad7dcef623d2874df4e79e0be01075096c3b:Merge tag 'dump-pr-v1' of https://gitlab.com/marcandre.lureau/qemu into staging (2026-07-02 16:04:08 +0200)are available in the Git repository at:
https://gitlab.com/harshpb/qemu.git tags/pull-ppc-for-11.1-misc-20260703for you to fetch changes up to
f9d05801eb4acd6402d73cb25d498a2419920cf9:ppc/pnv: add test to verify external DTB is honored (2026-07-03 10:07:21 +0530)
----------------------------------------------------------------
PPC queue for 2026-07-03
* SLOF FW update to 20260627
* ppc/pnv: external dtb fix and test addition
* PHB code refactor for better maintainability
* Revert deprecation of 405 CPUs
* target/ppc: Expose TB offset of guest in Qemu monitor-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEa4EM1tK+EPOIPSFCRUTplPnWj7sFAmpHPNAACgkQRUTplPnW j7tkjQ/9FP3/sTw0MxhGdLItxurrEzu3f4jiDKpnjEIqiJInzYl/2fJKZU611PSp gydfdNhkr71TxuJggibAosEblcWRq9KqQXysDpNrJ8rqEIeLj0lv9/JigLTZqU3e vsfDmfdCAB7YTtpm6HkTYW81EPD0X8AwQqz4FCNDQ0zeNUBIU8IU/ARP2j80CTnm 5xRK42aZb9CMYYIk3p8l4FuZmv6Y0Jf0daXM4WsEdHu9KjGvYr1glTY/lgblNPug kWIcjPqQ6x/hloYqxTTcsfJBnKfdaVppuh6LbJbgISsQIBzTqrD2HvEIpNFJRKnS 1XGwLj6cMmm4u2tv3BF0yVDJCEff312n2VFskmOrCUJOR+g2UqDzMb4+7JOpufEn Fla38+a9H9ThdnUNaak8+KquHDOJzDAOugOdMvsID8KlJ/q3wrTTEUUImj5Bwyqz Gc7naNx+3D+BSiahDe4LP71ZFLrQJ/eYCj71for5xZNcZVOQ6IDhymEMUAcRzkt6 2qICF6XmkYfuH+1113KMxG65NpKGEvktONQ6UpLWTubQ++BNK1Bt2v8PAWSis/d8 EYg5M/R7RqhbxufIUDLXJIuxB3xuiVg+e+x/M8X0LffmYhPI1cuZPmth4/75IKL+ 9Vddgc1hSHX1EUjRyZpoK6WArOTNvUOZMEcAhGr/0NgK5O/1Z10= =1TRv
-----END PGP SIGNATURE---------------------------------------------------------------------
Gautam Menghani (1):
target/ppc: Expose the TB offset of the guest in QEMU monitorGlenn Miles (1):
Revert "hw/ppc: Deprecate 405 CPUs"Jishnu Warrier (1):
hw/pci-host: Split PowerNV PHB5 code from PHB4 filesShivang Upadhyay (2):
ppc/pnv: avoid regenerating DTB if external DTB is present ppc/pnv: add test to verify external DTB is honoredThomas Huth (2):
pseries: Update SLOF firmware image to release 20260627 docs/system/ppc/pseries: Update the link to the SLOF repositorydocs/about/deprecated.rst | 9 ---- docs/system/ppc/pseries.rst | 2 +- target/ppc/cpu.h | 1 + hw/pci-host/pnv_phb4.c | 6 --- hw/pci-host/pnv_phb4_pec.c | 58 ------------------------- hw/pci-host/pnv_phb5.c | 23 ++++++++++ hw/pci-host/pnv_phb5_pec.c | 77 +++++++++++++++++++++++++++++++++ hw/ppc/pnv.c | 10 +++-- hw/ppc/ppc.c | 5 +++ target/ppc/cpu_init.c | 5 ++- hw/pci-host/meson.build | 2 + pc-bios/README | 2 +- pc-bios/slof.bin | Bin 994176 -> 997576 bytes roms/SLOF | 2 +- tests/functional/ppc64/test_powernv.py | 19 ++++++++ 15 files changed, 140 insertions(+), 81 deletions(-)create mode 100644
hw/pci-host/pnv_phb5.c
create mode 100644hw/pci-host/pnv_phb5_pec.c
Stefan Hajnoczi
AppliedApplied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/11.1 for any user-visible changes.