summaryrefslogtreecommitdiffstats
path: root/target-s390x/mem_helper.c
Commit message (Collapse)AuthorAgeFilesLines
* s390x/mmu: Skip exceptions properly when translating addresses for debugThomas Huth2015-02-181-6/+6
| | | | | | | | | | | | | When a fault occurs during the MMU lookup in s390_cpu_get_phys_page_debug(), the trigger_page_fault() function writes the translation exception code into the lowcore - something you would not expect during a memory access by the debugger. Ease this problem by adding an additional parameter to mmu_translate() which can be used to specify whether a program check and the translation exception code should be injected or not. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
* target-s390x: support OC and NC in the EX instructionPaolo Bonzini2015-02-031-0/+8
| | | | | | | | | This is needed to run the GMP testsuite. Reported-by: Torbjorn Granlund <torbjorng@google.com> Tested-by: Torbjorn Granlund <torbjorng@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Implement LURA, LURAG, STURGRichard Henderson2015-02-031-0/+22
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Fix STURARichard Henderson2015-02-031-1/+1
| | | | | | We were storing 16 bits instead of 32. Signed-off-by: Richard Henderson <rth@twiddle.net>
* softmmu: introduce cpu_ldst.hPaolo Bonzini2014-06-051-1/+1
| | | | | | | | | | This will collect all load and store helpers soon. For now it is just a replacement for softmmu_exec.h, which this patch stops including directly, but we also include it where this will be necessary in order to simplify the next patch. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* softmmu: commonize helper definitionsPaolo Bonzini2014-06-051-14/+0
| | | | | | | | | They do not need to be in op_helper.c. Because cputlb.c now includes softmmu_template.h twice for each size, io_readX must be elided the second time through. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* tcg: Invert the inclusion of helper.hRichard Henderson2014-05-281-1/+1
| | | | | | | | | | Rather than include helper.h with N values of GEN_HELPER, include a secondary file that sets up the macros to include helper.h. This minimizes the files that must be rebuilt when changing the macros for file N. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
* cputlb: Change tlb_flush() argument to CPUStateAndreas Färber2014-03-131-4/+9
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* cputlb: Change tlb_flush_page() argument to CPUStateAndreas Färber2014-03-131-3/+3
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* exec: Change cpu_abort() argument to CPUStateAndreas Färber2014-03-131-4/+7
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* translate-all: Change cpu_restore_state() argument to CPUStateAndreas Färber2014-03-131-4/+1
| | | | | | This lets us drop some local variables in tlb_fill() functions. Signed-off-by: Andreas Färber <afaerber@suse.de>
* cpu-exec: Change cpu_loop_exit() argument to CPUStateAndreas Färber2014-03-131-3/+3
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* exec: Change tlb_fill() argument to CPUStateAndreas Färber2014-03-131-3/+5
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* cpu: Move exception_index field from CPU_COMMON to CPUStateAndreas Färber2014-03-131-4/+5
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* cpu: Turn cpu_handle_mmu_fault() into a CPUClass hookAndreas Färber2014-03-131-1/+2
| | | | | | | | Note that while such functions may exist both for *-user and softmmu, only *-user uses the CPUState hook, while softmmu reuses the prototype for calling it directly. Signed-off-by: Andreas Färber <afaerber@suse.de>
* target-s390x: Clean up ENV_GET_CPU() usageAndreas Färber2014-03-131-3/+4
| | | | | | | | | | | | | Commits f606604f1c10b60ef294f1b9b229426521a365e3, 2c17449b3022ca9623c4a7e2a504a4150ac4ad30 and 5ce5944dc0ffdc43c11b5cad11e526f699aabe4c added usages of ENV_GET_CPU() macro in target-specific code. Use s390_env_get_cpu() instead. Cc: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <afaerber@suse.de>
* exec: Make stb_phys input an AddressSpaceEdgar E. Iglesias2014-02-111-1/+1
| | | | | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
* exec: Make stw_*_phys input an AddressSpaceEdgar E. Iglesias2014-02-111-1/+2
| | | | | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
* exec: Make stq_*_phys input an AddressSpaceEdgar E. Iglesias2014-02-111-1/+2
| | | | | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
* exec: Make ldq/ldub_*_phys input an AddressSpaceEdgar E. Iglesias2014-02-111-1/+2
| | | | | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
* Remove unnecessary break statementsStefan Weil2013-06-011-1/+0
| | | | | | | | | | | | | | | | | Fix these warnings from cppcheck: hw/display/cirrus_vga.c:2603: hw/sd/sd.c:348: hw/timer/exynos4210_mct.c:1033: target-arm/translate.c:9886: target-s390x/mem_helper.c:518: target-unicore32/translate.c:1936: style: Consecutive return, break, continue, goto or throw statements are unnecessary. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* Typo, spelling and grammatical fixesPeter Maydell2013-04-121-4/+4
| | | | | | | Minor fixes to documentation and code comments. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* target-s390: Perform COMPARE AND SWAP inlineRichard Henderson2013-01-051-53/+0
| | | | | | | Still no proper solution for CONFIG_USER_ONLY, but the system version is significantly better. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert CSPRichard Henderson2013-01-051-3/+3
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert STURARichard Henderson2013-01-051-2/+2
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert RRBERichard Henderson2013-01-051-1/+1
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert SSKERichard Henderson2013-01-051-1/+1
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert SRSTRichard Henderson2013-01-051-13/+26
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert CLST, MVSTRichard Henderson2013-01-051-61/+58
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert MVPGRichard Henderson2013-01-051-5/+2
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert CKSMRichard Henderson2013-01-051-18/+25
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert STCMRichard Henderson2013-01-051-37/+0
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert COMPARE AND SWAPRichard Henderson2013-01-051-19/+14
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert LRARichard Henderson2013-01-051-10/+3
| | | | | | | Note that truncating the store to r1 based on PSW_MASK_64 is incorrect. We always modify the entire register. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert INSERT CHARACTERS UNDER MASKRichard Henderson2013-01-051-33/+0
| | | | | | | Change the CC handling to be more like TEST UNDER MASK, with val & mask. This lets us handle ICMH much more like ICM. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Reorg exception handlingRichard Henderson2013-01-051-1/+1
| | | | | | | | | Make the user path more like the system path. Prepare for more kinds of runtime exceptions. Rename ILC to ILEN to make it clear that we want to pass around a full instruction length, rather than a "code" that happens to be stored one bit left in a larger field. Signed-off-by: Richard Henderson <rth@twiddle.net>
* exec: move include files to include/exec/Paolo Bonzini2012-12-191-5/+5
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* exec: refactor cpu_restore_stateBlue Swirl2012-12-161-7/+1
| | | | | | | | Refactor common code around calls to cpu_restore_state(). tb_find_pc() has now no external users, make it static. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Rename target_phys_addr_t to hwaddrAvi Kivity2012-10-231-5/+5
| | | | | | | | | | | | | | | target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are reserved) and its purpose doesn't match the name (most target_phys_addr_t addresses are not target specific). Replace it with a finger-friendly, standards conformant hwaddr. Outstanding patchsets can be fixed up with the command git rebase -i --exec 'find -name "*.[ch]" | xargs s/target_phys_addr_t/hwaddr/g' origin Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* target-s390x: switch to AREG0 free modeBlue Swirl2012-09-101-187/+151
| | | | | | | | | | Add an explicit CPUState parameter instead of relying on AREG0. Remove temporary wrappers and switch to AREG0 free mode. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> [agraf: fix conflicts] Signed-off-by: Alexander Graf <agraf@suse.de>
* target-s390x: avoid AREG0 for misc helpersBlue Swirl2012-09-101-1/+1
| | | | | | | | | Make misc helpers take a parameter for CPUState instead of relying on global env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> [agraf: fix conflict] Signed-off-by: Alexander Graf <agraf@suse.de>
* target-s390x: avoid AREG0 for FPU helpersBlue Swirl2012-09-101-0/+49
| | | | | | | | | | Make FPU helpers take a parameter for CPUState instead of relying on global env. Introduce temporary wrappers for FPU load and store ops. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* target-s390x: split memory access helpersBlue Swirl2012-09-101-0/+1190
Move memory access helpers to mem_helper.c. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> [agraf: fold softmmu include ifdefs together] Signed-off-by: Alexander Graf <agraf@suse.de>
OpenPOWER on IntegriCloud