[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/34] spapr: Fix support of POWER5+ processors
From: |
Cédric Le Goater |
Subject: |
[PULL 03/34] spapr: Fix support of POWER5+ processors |
Date: |
Wed, 12 Jan 2022 12:55:20 +0100 |
POWER5+ (ISA v2.03) processors are supported by the pseries machine
but they do not have Altivec instructions. Do not advertise support
for it in the DT.
To be noted that this test is in contradiction with the assert in
cap_vsx_apply().
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Tested-by: Fabiano Rosas <farosas@linux.ibm.com>
Message-Id: <20220105095142.3990430-3-clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
hw/ppc/spapr.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 837342932586..72f5dce751ee 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -723,10 +723,12 @@ static void spapr_dt_cpu(CPUState *cs, void *fdt, int
offset,
*
* Only CPUs for which we create core types in spapr_cpu_core.c
* are possible, and all of those have VMX */
- if (spapr_get_cap(spapr, SPAPR_CAP_VSX) != 0) {
- _FDT((fdt_setprop_cell(fdt, offset, "ibm,vmx", 2)));
- } else {
- _FDT((fdt_setprop_cell(fdt, offset, "ibm,vmx", 1)));
+ if (env->insns_flags & PPC_ALTIVEC) {
+ if (spapr_get_cap(spapr, SPAPR_CAP_VSX) != 0) {
+ _FDT((fdt_setprop_cell(fdt, offset, "ibm,vmx", 2)));
+ } else {
+ _FDT((fdt_setprop_cell(fdt, offset, "ibm,vmx", 1)));
+ }
}
/* Advertise DFP (Decimal Floating Point) if available
--
2.31.1
- [PULL 00/34] ppc queue, Cédric Le Goater, 2022/01/12
- [PULL 05/34] docs/system/ppc: Merge the PEF information into the pseries page, Cédric Le Goater, 2022/01/12
- [PULL 09/34] target/ppc: powerpc_excp: Keep 60x/7x5 soft MMU logs active, Cédric Le Goater, 2022/01/12
- [PULL 03/34] spapr: Fix support of POWER5+ processors,
Cédric Le Goater <=
- [PULL 02/34] target/ppc: Add popcntb instruction to POWER5+ processors, Cédric Le Goater, 2022/01/12
- [PULL 01/34] pseries: Update SLOF firmware image, Cédric Le Goater, 2022/01/12
- [PULL 14/34] target/ppc: Introduce a wrapper for powerpc_excp, Cédric Le Goater, 2022/01/12
- [PULL 04/34] target/ppc: Add extra float instructions to POWER5P processors, Cédric Le Goater, 2022/01/12
- [PULL 24/34] ppc/pnv: Move num_phbs under Pnv8Chip, Cédric Le Goater, 2022/01/12
- [PULL 17/34] pnv_phb4.c: add unique chassis and slot for pnv_phb4_root_port, Cédric Le Goater, 2022/01/12
- [PULL 10/34] target/ppc: powerpc_excp: Group unimplemented exceptions, Cédric Le Goater, 2022/01/12
- [PULL 25/34] pnv_phb3.h: change TYPE_PNV_PHB3_ROOT_BUS name, Cédric Le Goater, 2022/01/12
- [PULL 16/34] pnv_phb3.c: add unique chassis and slot for pnv_phb3_root_port, Cédric Le Goater, 2022/01/12
- [PULL 20/34] pnv_phb4.c: check if root port exists in rc_config functions, Cédric Le Goater, 2022/01/12