Skip to content

Commit 9b16ede

Browse files
committed
Merge tag 'pull-ppc-for-20250928-20250929' of https://gitlab.com/harshpb/qemu into staging
ppc queue for 20250928 * Support for PowerNV11 and PPE42 CPU/Machines. * Deprecation of Power8E and Power8NVL * Decodetree patches for some floating-point instructions * Minor bug fixes, improvements in ppc/spapr/xive/xics. # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEa4EM1tK+EPOIPSFCRUTplPnWj7sFAmjZgYQACgkQRUTplPnW # j7uNJQ/8Cbr3xqyCyyqL+MM+Ze1PbXe4xSgdg13A1sNU3IHTffB77DCQVOxjudUS # uo+XHVFssc4SKDZYjEzXFnYpzRpbZzfcuhG4kgn9QQ3VyKP+2xe6kWLleDbB6ds1 # e9ZAW6Ryk4R3ZFLnZzGfEdltliaoIn6zy4R25oJfJUgIRt0Xz++GBxll+Tdr8Exy # qstvvyyjeTiIS3kA1zk6fbhDRJKKBsA0L1G1Pk6AuTMKa1RRTCniA36idnGVFAuY # ef8WCEQYQS0do9Ytai06Tp1QNRVMG2y+AsKbSQRMi92lFfn+qhvA29OJd5TNvXtp # LNiIfXHo3jLjGBUP13iVN8b8udWdis9BayvA/OwDaKWgononEHb9nqJgzVJR4n7t # DxxUxcSCiEXOpObtklrKhi1nDt16nXPZ/bnnreMSWzxHBZK1My7qnI3S0hA7c11z # YgssB5wJbRaETaEVzQfWfAcSaPpXBzBEXOAJcbd+Ni6w9SxXz2OrhckTOvfrXpmI # XQ1KFUCkmTtXF1qB+oEihlrvG2qjdGuleRZdyiktaM2psBFgN/2gHl3S+JjL9kiY # 9FdBffr/2K604l7EQkAYWixe2WMMsjHVHpuxJ7opG7MMSXJZq9cXKIK+tbkSNoRO # Ia6Qr6eWJWjFF3y4OZCbYAOVU77ez6lo7kRj0e99fOjxfI+UuWU= # =Fjdq # -----END PGP SIGNATURE----- # gpg: Signature made Sun 28 Sep 2025 11:42:12 AM PDT # gpg: using RSA key 6B810CD6D2BE10F3883D21424544E994F9D68FBB # gpg: Good signature from "Harsh Prateek Bora <harsh.prateek.bora@gmail.com>" [undefined] # gpg: aka "Harsh Prateek Bora <harshpb@linux.ibm.com>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 6B81 0CD6 D2BE 10F3 883D 2142 4544 E994 F9D6 8FBB * tag 'pull-ppc-for-20250928-20250929' of https://gitlab.com/harshpb/qemu: (27 commits) target/ppc: use MAKE_64BIT_MASK for mcrfs exception clear mask target/ppc: Deprecate Power8E and Power8NVL target/ppc: Introduce macro for deprecating PowerPC CPUs target/ppc: Move remaining floating-point move instructions to decodetree. target/ppc: Move floating-point move instructions to decodetree. target/ppc: Move floating-point compare instructions to decodetree. target/ppc: Move floating-point rounding and conversion instructions to decodetree. ppc/xive2: Fix integer overflow warning in xive2_redistribute() ppc/spapr: init lrdr-capapcity phys with ram size if maxmem not provided hw/intc/xics: Add missing call to register vmstate_icp_server tests/functional: Add test for IBM PPE42 instructions hw/ppc: Add a test machine for the IBM PPE42 CPU hw/ppc: Support for an IBM PPE42 CPU decrementer target/ppc: Add IBM PPE42 special instructions target/ppc: Support for IBM PPE42 MMU target/ppc: Add IBM PPE42 exception model target/ppc: IBM PPE42 exception flags and regs target/ppc: Add IBM PPE42 family of processors target/ppc: IBM PPE42 general regs and flags tests/powernv: Add PowerNV test for Power11 ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 parents 4975b64 + 6c51df5 commit 9b16ede

36 files changed

+2407
-368
lines changed

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,6 +1530,13 @@ F: include/hw/pci-host/grackle.h
15301530
F: pc-bios/qemu_vga.ndrv
15311531
F: tests/functional/ppc/test_mac.py
15321532

1533+
PPE42
1534+
M: Glenn Miles <milesg@linux.ibm.com>
1535+
L: qemu-ppc@nongnu.org
1536+
S: Odd Fixes
1537+
F: hw/ppc/ppe42_machine.c
1538+
F: tests/functional/ppc/test_ppe42.py
1539+
15331540
PReP
15341541
M: Hervé Poussineau <hpoussin@reactos.org>
15351542
L: qemu-ppc@nongnu.org

docs/about/deprecated.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,15 @@ embedded 405 for power management (OCC) and other internal tasks, it
253253
is theoretically possible to use QEMU to model them. Let's keep the
254254
CPU implementation for a while before removing all support.
255255

256+
Power8E and Power8NVL CPUs and corresponding Pnv chips (since 10.1)
257+
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
258+
259+
The Power8E and Power8NVL variants of Power8 are not really useful anymore
260+
in qemu, and are old and unmaintained now.
261+
262+
The CPUs as well as corresponding Power8NVL and Power8E PnvChips will also
263+
be considered deprecated.
264+
256265
System emulator machines
257266
------------------------
258267

docs/system/ppc/powernv.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
PowerNV family boards (``powernv8``, ``powernv9``, ``powernv10``)
2-
==================================================================
1+
PowerNV family boards (``powernv8``, ``powernv9``, ``powernv10``, ``powernv11``)
2+
================================================================================
33

44
PowerNV (as Non-Virtualized) is the "bare metal" platform using the
55
OPAL firmware. It runs Linux on IBM and OpenPOWER systems and it can
@@ -15,11 +15,12 @@ beyond the scope of what QEMU addresses today.
1515
Supported devices
1616
-----------------
1717

18-
* Multi processor support for POWER8, POWER8NVL and POWER9.
18+
* Multi processor support for POWER8, POWER8NVL, POWER9, Power10 and Power11.
1919
* XSCOM, serial communication sideband bus to configure chiplets.
2020
* Simple LPC Controller.
2121
* Processor Service Interface (PSI) Controller.
22-
* Interrupt Controller, XICS (POWER8) and XIVE (POWER9) and XIVE2 (Power10).
22+
* Interrupt Controller, XICS (POWER8) and XIVE (POWER9) and XIVE2 (Power10 &
23+
Power11).
2324
* POWER8 PHB3 PCIe Host bridge and POWER9 PHB4 PCIe Host bridge.
2425
* Simple OCC is an on-chip micro-controller used for power management tasks.
2526
* iBT device to handle BMC communication, with the internal BMC simulator

hw/intc/pnv_xive2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ static PnvXive2 *pnv_xive2_get_remote(uint32_t vsd_type, hwaddr fwd_addr)
110110
int i;
111111

112112
for (i = 0; i < pnv->num_chips; i++) {
113-
Pnv10Chip *chip10 = PNV10_CHIP(pnv->chips[i]);
114-
PnvXive2 *xive = &chip10->xive;
113+
PnvChipClass *k = PNV_CHIP_GET_CLASS(pnv->chips[i]);
114+
PnvXive2 *xive = PNV_XIVE2(k->intc_get(pnv->chips[i]));
115115

116116
/*
117117
* Is this the XIVE matching the forwarded VSD address is for this

hw/intc/xics.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@ static void icp_realize(DeviceState *dev, Error **errp)
335335
return;
336336
}
337337
}
338+
339+
vmstate_register(NULL, icp->cs->cpu_index, &vmstate_icp_server, icp);
338340
}
339341

340342
static void icp_unrealize(DeviceState *dev)

hw/intc/xive2.c

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,35 @@ static void xive2_nvgc_set_backlog(Xive2Nvgc *nvgc, uint8_t priority,
9595
}
9696
}
9797

98+
static uint32_t xive2_nvgc_get_idx(uint32_t nvp_idx, uint8_t group)
99+
{
100+
uint32_t nvgc_idx;
101+
102+
if (group > 0) {
103+
nvgc_idx = (nvp_idx & (0xffffffffULL << group)) |
104+
((1 << (group - 1)) - 1);
105+
} else {
106+
nvgc_idx = nvp_idx;
107+
}
108+
109+
return nvgc_idx;
110+
}
111+
112+
static uint8_t xive2_nvgc_get_blk(uint8_t nvp_blk, uint8_t crowd)
113+
{
114+
uint8_t nvgc_blk;
115+
116+
if (crowd > 0) {
117+
crowd = (crowd == 3) ? 4 : crowd;
118+
nvgc_blk = (nvp_blk & (0xffffffffULL << crowd)) |
119+
((1 << (crowd - 1)) - 1);
120+
} else {
121+
nvgc_blk = nvp_blk;
122+
}
123+
124+
return nvgc_blk;
125+
}
126+
98127
uint64_t xive2_presenter_nvgc_backlog_op(XivePresenter *xptr,
99128
bool crowd,
100129
uint8_t blk, uint32_t idx,
@@ -638,20 +667,8 @@ static void xive2_redistribute(Xive2Router *xrtr, XiveTCTX *tctx, uint8_t ring)
638667

639668
trace_xive_redistribute(tctx->cs->cpu_index, ring, nvp_blk, nvp_idx);
640669
/* convert crowd/group to blk/idx */
641-
if (group > 0) {
642-
nvgc_idx = (nvp_idx & (0xffffffff << group)) |
643-
((1 << (group - 1)) - 1);
644-
} else {
645-
nvgc_idx = nvp_idx;
646-
}
647-
648-
if (crowd > 0) {
649-
crowd = (crowd == 3) ? 4 : crowd;
650-
nvgc_blk = (nvp_blk & (0xffffffff << crowd)) |
651-
((1 << (crowd - 1)) - 1);
652-
} else {
653-
nvgc_blk = nvp_blk;
654-
}
670+
nvgc_idx = xive2_nvgc_get_idx(nvp_idx, group);
671+
nvgc_blk = xive2_nvgc_get_blk(nvp_blk, crowd);
655672

656673
/* Use blk/idx to retrieve the NVGC */
657674
if (xive2_router_get_nvgc(xrtr, crowd, nvgc_blk, nvgc_idx, &nvgc)) {

hw/ppc/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ config POWERNV
4444
select SSI_M25P80
4545
select PNV_SPI
4646

47+
config PPC405
48+
bool
49+
default y
50+
depends on PPC
51+
4752
config PPC440
4853
bool
4954
default y

hw/ppc/meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ ppc_ss.add(when: 'CONFIG_POWERNV', if_true: files(
5757
'pnv_n1_chiplet.c',
5858
))
5959
# PowerPC 4xx boards
60+
ppc_ss.add(when: 'CONFIG_PPC405', if_true: files(
61+
'ppe42_machine.c'))
6062
ppc_ss.add(when: 'CONFIG_PPC440', if_true: files(
6163
'ppc440_bamboo.c',
6264
'ppc440_uc.c'))

0 commit comments

Comments
 (0)