[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 31/67] target/ppc: Introduce 'PowerPCCPUClass::spapr_logical_pvr'
From: |
Nicholas Piggin |
Subject: |
[PULL 31/67] target/ppc: Introduce 'PowerPCCPUClass::spapr_logical_pvr' |
Date: |
Mon, 4 Nov 2024 10:18:20 +1000 |
From: Aditya Gupta <adityag@linux.ibm.com>
Introduce 'PnvChipClass::spapr_logical_pvr' to know corresponding logical
PVR of a PowerPC CPU.
This helps to have a one-to-one mapping between PVR and logical PVR for
a CPU, and used in a later commit to handle cases where PCR of two
generations of Power chip is same, which causes regressions with
compat-mode.
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
Tested-by: Amit Machhiwal <amachhiw@linux.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
target/ppc/cpu.h | 1 +
target/ppc/cpu_init.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index b838bc2ab9..daa12f8733 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -1473,6 +1473,7 @@ struct PowerPCCPUClass {
void (*parent_parse_features)(const char *type, char *str, Error **errp);
uint32_t pvr;
+ uint32_t spapr_logical_pvr;
/*
* If @best is false, match if pcc is in the family of pvr
* Else match only if pcc is the best match for pvr in this family.
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
index 7c3716b56f..bc8ec77fa0 100644
--- a/target/ppc/cpu_init.c
+++ b/target/ppc/cpu_init.c
@@ -6154,6 +6154,7 @@ POWERPC_FAMILY(POWER7)(ObjectClass *oc, void *data)
dc->fw_name = "PowerPC,POWER7";
dc->desc = "POWER7";
+ pcc->spapr_logical_pvr = CPU_POWERPC_LOGICAL_2_06_PLUS;
pcc->pvr_match = ppc_pvr_match_power7;
pcc->pcr_mask = PCR_VEC_DIS | PCR_VSX_DIS | PCR_COMPAT_2_05;
pcc->pcr_supported = PCR_COMPAT_2_06 | PCR_COMPAT_2_05;
@@ -6317,6 +6318,7 @@ POWERPC_FAMILY(POWER8)(ObjectClass *oc, void *data)
dc->fw_name = "PowerPC,POWER8";
dc->desc = "POWER8";
+ pcc->spapr_logical_pvr = CPU_POWERPC_LOGICAL_2_07;
pcc->pvr_match = ppc_pvr_match_power8;
pcc->pcr_mask = PCR_TM_DIS | PCR_COMPAT_2_06 | PCR_COMPAT_2_05;
pcc->pcr_supported = PCR_COMPAT_2_07 | PCR_COMPAT_2_06 | PCR_COMPAT_2_05;
@@ -6510,6 +6512,7 @@ POWERPC_FAMILY(POWER9)(ObjectClass *oc, void *data)
dc->fw_name = "PowerPC,POWER9";
dc->desc = "POWER9";
+ pcc->spapr_logical_pvr = CPU_POWERPC_LOGICAL_3_00;
pcc->pvr_match = ppc_pvr_match_power9;
pcc->pcr_mask = PPC_PCR_MASK_POWER9;
pcc->pcr_supported = PPC_PCR_SUPPORTED_POWER9;
@@ -6644,6 +6647,7 @@ POWERPC_FAMILY(POWER10)(ObjectClass *oc, void *data)
dc->fw_name = "PowerPC,POWER10";
dc->desc = "POWER10";
+ pcc->spapr_logical_pvr = CPU_POWERPC_LOGICAL_3_10;
pcc->pvr_match = ppc_pvr_match_power10;
pcc->pcr_mask = PPC_PCR_MASK_POWER10;
pcc->pcr_supported = PPC_PCR_SUPPORTED_POWER10;
--
2.45.2
- [PULL 19/67] ppc/spapr: remove deprecated machine pseries-2.3, (continued)
- [PULL 19/67] ppc/spapr: remove deprecated machine pseries-2.3, Nicholas Piggin, 2024/11/03
- [PULL 20/67] ppc/spapr: remove deprecated machine pseries-2.4, Nicholas Piggin, 2024/11/03
- [PULL 22/67] ppc/spapr: remove deprecated machine pseries-2.6, Nicholas Piggin, 2024/11/03
- [PULL 25/67] ppc/spapr: remove deprecated machine pseries-2.9, Nicholas Piggin, 2024/11/03
- [PULL 24/67] ppc/spapr: remove deprecated machine pseries-2.8, Nicholas Piggin, 2024/11/03
- [PULL 26/67] ppc/spapr: remove deprecated machine pseries-2.10, Nicholas Piggin, 2024/11/03
- [PULL 27/67] ppc/spapr: remove deprecated machine pseries-2.11, Nicholas Piggin, 2024/11/03
- [PULL 28/67] ppc/spapr: remove deprecated machine pseries-2.12-sxxm, Nicholas Piggin, 2024/11/03
- [PULL 29/67] ppc/spapr: remove deprecated machine pseries-2.12, Nicholas Piggin, 2024/11/03
- [PULL 30/67] target/ppc: Reduce code duplication across Power9/10 init code, Nicholas Piggin, 2024/11/03
- [PULL 31/67] target/ppc: Introduce 'PowerPCCPUClass::spapr_logical_pvr',
Nicholas Piggin <=
- [PULL 32/67] target/ppc: Fix regression due to Power10 and Power11 having same PCR, Nicholas Piggin, 2024/11/03
- [PULL 33/67] target/ppc: Add Power11 DD2.0 processor, Nicholas Piggin, 2024/11/03
- [PULL 34/67] ppc/pseries: Add Power11 cpu type, Nicholas Piggin, 2024/11/03
- [PULL 35/67] target/ppc: use locally stored msr and avoid indirect access, Nicholas Piggin, 2024/11/03
- [PULL 36/67] target/ppc: optimize hreg_compute_pmu_hflags_value, Nicholas Piggin, 2024/11/03
- [PULL 37/67] target/ppc: optimize hreg_compute_pmu_hflags_value, Nicholas Piggin, 2024/11/03
- [PULL 38/67] target/ppc: optimize p9 exception handling routines, Nicholas Piggin, 2024/11/03
- [PULL 39/67] target/ppc: optimize p8 exception handling routines, Nicholas Piggin, 2024/11/03
- [PULL 40/67] target/ppc: optimize p7 exception handling routines, Nicholas Piggin, 2024/11/03
- [PULL 42/67] target/ppc: combine multiple ail checks into one, Nicholas Piggin, 2024/11/03