- Jun 03, 2021
-
-
Peter Maydell authored
The do_vfp_2op_sp() and do_vfp_2op_dp() functions currently check whether floating point is supported via the aa32_fpdp_v2 and aa32_fpsp_v2 isar checks. For v8.1M MVE support, the VMOV_reg trans functions (but not any of the others) need to update this to also allow the insn if MVE is implemented. Move the check out of the do_ function and into its callsites (which are all implemented via the DO_VFP_2OP macro), so we have a place to change the check for the VMOV insns. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20210520152840.24453-4-peter.maydell@linaro.org
-
Peter Maydell authored
Some v8M instructions are present if either the floating point extension or MVE is implemented. Update our implementation of them to check for MVE as well as for FP. This is all the insns which use CheckDecodeFaults(ExtType_MveOrFp) or CheckDecodeFaults(ExtType_MveOrDpFp) in their pseudocode, which are essentially the loads and stores, moves and sysreg accesses, except for VMOV_reg_sp and VMOV_reg_dp, which we handle in subsequent patches because they need a refactor to provide a place to put the new MVE check. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20210520152840.24453-3-peter.maydell@linaro.org
-
Peter Maydell authored
Add the isar feature check functions we will need for v8.1M MVE: * a check for MVE present: this corresponds to the pseudocode's CheckDecodeFaults(ExtType_Mve) * a check for the optional floating-point part of MVE: this corresponds to CheckDecodeFaults(ExtType_MveFp) Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20210520152840.24453-2-peter.maydell@linaro.org
-
Peter Maydell authored
ppc patch queue 2021-06-03 Next batch of ppc target patches. Highlights are: * A fix for a regression with single-step mode * Start of moving ppc to use decodetree * Implementation of some POWER10 64-bit prefixed instructions * Several cleanups to softmmu code * Continued progress towards allowing --disable-tcg * Fix for the POWER PEF implementation * Fix for LPCR handling of hotplugged CPUs * Assorted other bugfixes and cleanups This patchset does contain a couple of changes to code outside my normal scope of maintainership, related to the removal of cpu_dump and cpu_statistics hooks. ppc was the last target arch implementing these at all, and they didn't really do anything there either. The patches should have relevant acks. # gpg: Signature made Thu 03 Jun 2021 09:20:59 BST # gpg: using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full] # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full] # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" [full] # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" [unknown] # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dg-gitlab/tags/ppc-for-6.1-20210603: (42 commits) target/ppc: fix single-step exception regression target/ppc: Move cmp/cmpi/cmpl/cmpli to decodetree target/ppc: Move addpcis to decodetree target/ppc: Implement vcfuged instruction target/ppc: Implement cfuged instruction target/ppc: Implement setbc/setbcr/stnbc/setnbcr instructions target/ppc: Implement prefixed integer store instructions target/ppc: Move D/DS/X-form integer stores to decodetree target/ppc: Implement prefixed integer load instructions target/ppc: Move D/DS/X-form integer loads to decodetree target/ppc: Implement PNOP target/ppc: Move ADDI, ADDIS to decodetree, implement PADDI target/ppc: Add infrastructure for prefixed insns target/ppc: Move page crossing check to ppc_tr_translate_insn target/ppc: Introduce macros to check isa extensions target/ppc: powerpc_excp: Consolidade TLB miss code target/ppc: powerpc_excp: Remove dump_syscall_vectored target/ppc: powerpc_excp: Move lpes code to where it is used target/ppc: overhauled and moved logic of storing fpscr target/ppc: removed all mentions to PPC_DUMP_CPU ... Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Luis Pires authored
Commit 6086c751 (target/ppc: Replace POWERPC_EXCP_BRANCH with DISAS_NORETURN) broke the generation of exceptions when CPU_SINGLE_STEP or CPU_BRANCH_STEP were set, due to nip always being reset to the address of the current instruction. This fix leaves nip untouched when generating the exception. Signed-off-by:
Luis Pires <luis.pires@eldorado.org.br> Reported-by:
Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20210602125103.332793-1-luis.pires@eldorado.org.br> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Matheus Ferst authored
Additionally, REQUIRE_64BIT when L=1 to match what is specified in The Programming Environments Manual: "For 32-bit implementations, the L field must be cleared, otherwise the instruction form is invalid." Some CPUs are known to deviate from this specification by ignoring the L bit [1]. The stricter behavior, however, can help users that test software with qemu, making it more likely to detect bugs that would otherwise be silent. If deemed necessary, a future patch can adapt this behavior based on the specific CPU model. [1] The 601 manual is the only one I've found that explicitly states that the L bit is ignored, but we also observe this behavior in a 7447A v1.2. Signed-off-by:
Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20210601193528.2533031-15-matheus.ferst@eldorado.org.br> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> [dwg: Corrected whitespace error] Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Matheus Ferst authored
Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20210601193528.2533031-14-matheus.ferst@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Matheus Ferst authored
Signed-off-by:
Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20210601193528.2533031-13-matheus.ferst@eldorado.org.br> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Matheus Ferst authored
Signed-off-by:
Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20210601193528.2533031-12-matheus.ferst@eldorado.org.br> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Matheus Ferst authored
Implements the following PowerISA v3.1 instructions: setbc: Set Boolean Condition setbcr: Set Boolean Condition Reverse setnbc: Set Negative Boolean Condition setnbcr: Set Negative Boolean Condition Reverse Signed-off-by:
Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20210601193528.2533031-11-matheus.ferst@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20210601193528.2533031-10-matheus.ferst@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
These are all connected by macros in the legacy decoding. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20210601193528.2533031-9-matheus.ferst@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20210601193528.2533031-8-matheus.ferst@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
These are all connected by macros in the legacy decoding. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20210601193528.2533031-7-matheus.ferst@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
The illegal suffix behavior matches what was observed in a POWER10 DD2.0 machine. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20210601193528.2533031-6-matheus.ferst@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20210601193528.2533031-5-matheus.ferst@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
Signed-off-by:
Luis Pires <luis.pires@eldorado.org.br> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20210601193528.2533031-4-matheus.ferst@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
With prefixed instructions, the number of instructions remaining until the page crossing is no longer constant. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20210601193528.2533031-3-matheus.ferst@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Richard Henderson authored
These will be used by the decodetree trans_* functions to early-exit when the instruction set is not enabled. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20210601193528.2533031-2-matheus.ferst@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Fabiano Rosas authored
The only difference in the code for Instruction fetch, Data load and Data store TLB miss errors is that when called from an unsupported processor (i.e. not one of 602, 603, 603e, G2, 7x5 or 74xx), they abort with a message specific to the operation type (insn fetch, data load/store). If a processor does not support those interrupts we should not be registering them in init_excp_<proc> to begin with, so that error message would never be used. I'm leaving the message in for completeness, but making it generic and consolidating the three interrupts into the same case statement body. Signed-off-by:
Fabiano Rosas <farosas@linux.ibm.com> Message-Id: <20210601214649.785647-4-farosas@linux.ibm.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Fabiano Rosas authored
This function is identical to dump_syscall, so use the latter for system call vectored as well. Signed-off-by:
Fabiano Rosas <farosas@linux.ibm.com> Message-Id: <20210601214649.785647-3-farosas@linux.ibm.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Fabiano Rosas authored
Signed-off-by:
Fabiano Rosas <farosas@linux.ibm.com> Message-Id: <20210601214649.785647-2-farosas@linux.ibm.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Bruno Larsen (billionai) authored
Followed the suggested overhaul to store_fpscr logic, and moved it to cpu.c where it can be accessed in !TCG builds. The overhaul was suggested because storing a value to fpscr should never raise an exception, so we could remove all the mess that happened with POWERPC_EXCP_FP. We also moved fpscr_set_rounding_mode into cpu.c as it could now be moved there, and it is needed when a value for the fpscr is being stored directly. Suggested-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210527163522.23019-1-bruno.larsen@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Bruno Larsen (billionai) authored
This feature will no longer be useful as ppc moves to using decodetree for TCG. And building with it enabled is no longer possible, due to changes in opc_handler_t. Since the last commit that mentions it happened in 2014, I think it is safe to remove it. Signed-off-by:
Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Message-Id: <20210531145629.21300-5-bruno.larsen@eldorado.org.br> Reviewed-by:
Luis Pires <luis.pires@eldorado.org.br> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Bruno Larsen (billionai) authored
since both, PPC_DO_STATISTICS and PPC_DUMP_CPU, are obsoleted as target/ppc moves to decodetree, we can remove this ifdef based decision tree, and only have what is now the standard option for the macro. Signed-off-by:
Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Message-Id: <20210531145629.21300-4-bruno.larsen@eldorado.org.br> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Bruno Larsen (billionai) authored
Documented the removal of the HMP command info cpustats Signed-off-by:
Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Message-Id: <20210531145629.21300-3-bruno.larsen@eldorado.org.br> Reviewed-by:
Luis Pires <luis.pires@eldorado.org.br> Reviewed-by:
Lucas Mateus <lucas.araujo@eldorado.org.br> Reviewed-by:
Greg Kurz <groug@kaod.org> [dwg: Fix a Sphinx formatting error] Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Bruno Larsen (billionai) authored
No more architectures set the pointer to dump_statistics, so there's no point in keeping it, or the related cpu_dump_statistics function. Suggested-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Message-Id: <20210526202104.127910-6-bruno.larsen@eldorado.org.br> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Luis Pires <luis.pires@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Message-Id: <20210531145629.21300-2-bruno.larsen@eldorado.org.br> Acked-by:
Eduardo Habkost <ehabkost@redhat.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Daniel Henrique Barboza authored
QEMU is failing to launch a CGS pSeries guest in a host that has PEF support: qemu-system-ppc64: ../softmmu/vl.c:2585: qemu_machine_creation_done: Assertion `machine->cgs->ready' failed. Aborted This is happening because we're not setting the cgs->ready flag that is asserted in qemu_machine_creation_done() during machine start. cgs->ready is set in s390_pv_kvm_init() and sev_kvm_init(). Let's set it in kvmppc_svm_init() as well. Reported-by:
Ram Pai <linuxram@us.ibm.com> Signed-off-by:
Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20210528201619.52363-1-danielhb413@gmail.com> Acked-by:
Ram Pai <linuxram@us.ibm.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Bruno Larsen (billionai) authored
Since ppc was the last architecture to collect these statistics and it is currently phasing this collection out, the command that would query this information is being removed. Suggested-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Message-Id: <20210526202104.127910-5-bruno.larsen@eldorado.org.br> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Luis Pires <luis.pires@eldorado.org.br> Acked-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Bruno Larsen (billionai) authored
Removed the commented out definition and all ifdefs relating to PPC_DUMP_STATISTICS, as it's hardly ever used. Suggested-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Message-Id: <20210526202104.127910-4-bruno.larsen@eldorado.org.br> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Luis Pires <luis.pires@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Bruno Larsen (billionai) authored
This function requires surce code modification to be useful, which means it probably is not used often, and the move to using decodetree means the statistics won't even be collected anymore. Also removed setting dump_statistics in ppc_cpu_realize, since it was only useful when in conjunction with ppc_cpu_dump_statistics. Suggested-by:
Richard <Henderson<richard.henderson@linaro.org> Signed-off-by:
Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Message-Id: <20210526202104.127910-3-bruno.larsen@eldorado.org.br> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Luis Pires <luis.pires@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Bruno Larsen (billionai) authored
updated build file to not compile some sources that are unnecessary if TCG is disabled on the system. Signed-off-by:
Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Message-Id: <20210525115355.8254-5-bruno.larsen@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Bruno Larsen (billionai) authored
Created a file with stubs needed to compile disabling TCG. *_ppc_opcodes were created to make cpu_init.c have a few less ifdefs, since they are not needed. softmmu_resize_hpt_* have to be created because the compiler can't automatically know they aren't used, but they should never be reached. Signed-off-by:
Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Message-Id: <20210525115355.8254-4-bruno.larsen@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Bruno Larsen (billionai) authored
excp_helper.c, mmu-hash64.c and mmu_helper.c have some function declarations that are TCG-only, and couldn't be easily moved to a TCG only file, so ifdefs were added around them. We also needed ifdefs around some header files because helper-proto.h includes trace/generated-helpers.h, which is never created when building without TCG, and cpu_ldst.h includes tcg/tcg.h, whose containing folder is not included as a -iquote. As future cleanup, we could change the part of the configuration script to add those. cpu_init.c also had a callback definition that is TCG only and could be removed as part of a future cleanup (all the dump_statistics part is almost never used and will become obsolete as we transition to using decodetree). Signed-off-by:
Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Message-Id: <20210525115355.8254-3-bruno.larsen@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Bruno Larsen (billionai) authored
The write calback decision when registering the MAS SPR has been turned into a ternary operation, rather than an if-then-else block. This was done because when building without TCG, even though the compiler will optimize away the pointers to spr_write_generic*, it doesn't optimize away the decision and assignment to the local pointer, creating compiler errors. This cleanup looked better than using ifdefs, so we decided to with it. Signed-off-by:
Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210525115355.8254-2-bruno.larsen@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Nicholas Piggin authored
TCG does not keep track of AIL mode in a central place, it's based on the current LPCR[AIL] bits. Synchronize the new CPU's LPCR to the current LPCR in rtas_start_cpu(), similarly to the way the ILE bit is synchronized. Open-code the ILE setting as well now that the caller's LPCR is available directly, there is no need for the indirection. Without this, under both TCG and KVM, adding a POWER8/9/10 class CPU with a new core ID after a modern Linux has booted results in the new CPU's LPCR missing the LPCR[AIL]=0b11 setting that the other CPUs have. This can cause crashes and unexpected behaviour. Signed-off-by:
Nicholas Piggin <npiggin@gmail.com> Message-Id: <20210526091626.3388262-3-npiggin@gmail.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Reviewed-by:
Greg Kurz <groug@kaod.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Nicholas Piggin authored
Commit 47a9b551 ("spapr: Clean up handling of LPCR power-saving exit bits") moved this logic but did not remove the comment from the previous location. Signed-off-by:
Nicholas Piggin <npiggin@gmail.com> Message-Id: <20210526091626.3388262-2-npiggin@gmail.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Reviewed-by:
Greg Kurz <groug@kaod.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Bruno Larsen (billionai) authored
ppc_store_ptcr, defined in mmu_helper.c, was only used by helper_store_ptcr, in misc_helper.c. To avoid possible confusion, the function was folded into the helper. Signed-off-by:
Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Message-Id: <20210526143516.125582-1-bruno.larsen@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Shivaprasad G Bhat authored
The FDT code is adding the pmem root node by name "persistent-memory" which should have been "ibm,persistent-memory". The linux fetches the device tree nodes by type and it has been working correctly as the type is correct. If someone searches by its intended name it would fail, so fix that. Reported-by:
Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Signed-off-by:
Shivaprasad G Bhat <sbhat@linux.ibm.com> Message-Id: <162204278956.219.9061511386011411578.stgit@cc493db1e665> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Shivaprasad G Bhat authored
The subsequent patches add definitions which tend to get the compilation to cyclic dependency. So, prepare with forward declarations, move the definitions and clean up. Signed-off-by:
Shivaprasad G Bhat <sbhat@linux.ibm.com> Message-Id: <162133925415.610.11584121797866216417.stgit@4f1e6f2bd33e> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-