Files
erofs-linux/arch/powerpc/kernel
Amit Machhiwal e4de1b9cb3 powerpc/dt_cpu_ftrs: Set CPU_FTR_P11_PVR for Power11 and later processors
When using device tree CPU features (dt-cpu-ftrs), the kernel bypasses
the traditional cputable-based CPU identification and instead derives
CPU features from the device tree's "ibm,powerpc-cpu-features" node
provided by firmware.

However, CPU_FTR_P11_PVR is a kernel-internal feature flag used to
identify Power11 and later processors, and is not represented in the
device tree's ISA feature set. While ISA v3.1 support (indicated by
CPU_FTR_ARCH_31) is present on both Power10 and Power11, the
CPU_FTR_P11_PVR flag is specifically needed by code that must
distinguish between Power10 and Power11 processors.

Without this flag set, code that checks for Power11 using
cpu_has_feature(CPU_FTR_P11_PVR) will incorrectly return false on
Power11+ systems using dt-cpu-ftrs, leading to incorrect behavior.

This issue manifests specifically in powernv environments (bare-metal
or QEMU TCG with powernv machine type), where skiboot/OPAL firmware
provides the "ibm,powerpc-cpu-features" node, causing the kernel to
use dt-cpu-ftrs. The issue does not affect pseries guests, where SLOF
firmware does not provide this node, causing the kernel to fall back
to the traditional cputable path (identify_cpu) which correctly sets
CPU_FTR_P11_PVR during PVR-based CPU identification.

In powernv TCG guests, the missing flag causes KVM code to trigger
warnings when attempting to create KVM guests, as cpu_features shows
0x000c00eb8f4fb187 (missing bit 53) instead of the correct
0x002c00eb8f4fb187 (with bit 53 set).

Fix this by setting CPU_FTR_P11_PVR for all processors with
PVR >= PVR_POWER11 when ISA v3.1 support is detected in
cpufeatures_setup_start(). This approach ensures forward
compatibility with future processor generations.

Fixes: 96e266e3bc ("KVM: PPC: Book3S HV: Add Power11 capability support for Nested PAPR guests")
Cc: [email protected] # v6.13+
Signed-off-by: Amit Machhiwal <[email protected]>
Reviewed-by: Mukesh Kumar Chaurasiya (IBM) <[email protected]>
Reviewed-by: Christophe Leroy (CS GROUP) <[email protected]>
Signed-off-by: Madhavan Srinivasan <[email protected]>
Link: https://patch.msgid.link/[email protected]
2026-07-15 08:04:13 +05:30
..
2026-05-20 06:57:14 +05:30
…
…
…
2025-07-26 13:07:52 +05:30
…
…
…
…
…
2026-06-02 11:24:31 +05:30
2026-04-01 09:21:06 +05:30
…
2024-10-29 23:01:52 +11:00
…
…
…
…
…
…
…
…
2026-05-20 06:57:14 +05:30
…
…
…
…
…
…
2026-05-20 06:57:13 +05:30
…
2024-10-29 23:01:52 +11:00
2025-02-26 21:15:09 +05:30
…
…
…