[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 12/19] ppc/pnv: Implement big-core PVR for Power9/10
From: |
Nicholas Piggin |
Subject: |
[PATCH v3 12/19] ppc/pnv: Implement big-core PVR for Power9/10 |
Date: |
Wed, 17 Jul 2024 02:26:08 +1000 |
Power9/10 CPUs have PVR[51] set in small-core mode and clear in big-core
mode. This is used by skiboot firmware.
PVR is not hypervisor-privileged but it is not so important that spapr
to implement this because it's generally masked out of PVR matching code
in kernels, and only used by firmware.
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
hw/ppc/pnv_core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c
index 6dc05534d7..43cfeaa2d4 100644
--- a/hw/ppc/pnv_core.c
+++ b/hw/ppc/pnv_core.c
@@ -58,6 +58,10 @@ static void pnv_core_cpu_reset(PnvCore *pc, PowerPCCPU *cpu)
env->nip = 0x10;
env->msr |= MSR_HVB; /* Hypervisor mode */
env->spr[SPR_HRMOR] = pc->hrmor;
+ if (pc->big_core) {
+ /* Clear "small core" bit on Power9/10 (this is set in default PVR) */
+ env->spr[SPR_PVR] &= ~PPC_BIT(51);
+ }
hreg_compute_hflags(env);
ppc_maybe_interrupt(env);
--
2.45.1
- [PATCH v3 00/19] ppc/pnv: Better big-core model, lpar-per-core, PC unit, Nicholas Piggin, 2024/07/16
- [PATCH v3 01/19] target/ppc: Fix msgsnd for POWER8, Nicholas Piggin, 2024/07/16
- [PATCH v3 03/19] ppc/pnv: Move timebase state into PnvCore, Nicholas Piggin, 2024/07/16
- [PATCH v3 05/19] ppc/pnv: use class attribute to limit SMT threads for different machines, Nicholas Piggin, 2024/07/16
- [PATCH v3 02/19] ppc/pnv: Add pointer from PnvCPUState to PnvCore, Nicholas Piggin, 2024/07/16
- [PATCH v3 12/19] ppc/pnv: Implement big-core PVR for Power9/10,
Nicholas Piggin <=
- [PATCH v3 04/19] target/ppc: Move SPR indirect registers into PnvCore, Nicholas Piggin, 2024/07/16
- [PATCH v3 08/19] target/ppc: Add helpers to check for SMT sibling threads, Nicholas Piggin, 2024/07/16
- [PATCH v3 13/19] ppc/pnv: Implement Power9 CPU core thread state indirect register, Nicholas Piggin, 2024/07/16
- [PATCH v3 10/19] ppc/pnv: Add a big-core mode that joins two regular cores, Nicholas Piggin, 2024/07/16
- [PATCH v3 14/19] ppc/pnv: Add POWER10 ChipTOD quirk for big-core, Nicholas Piggin, 2024/07/16
- [PATCH v3 15/19] ppc/pnv: Add big-core machine property, Nicholas Piggin, 2024/07/16
- [PATCH v3 19/19] ppc/pnv: Add an LPAR per core machine option, Nicholas Piggin, 2024/07/16