summaryrefslogtreecommitdiffstats
path: root/target-s390x/misc_helper.c
Commit message (Collapse)AuthorAgeFilesLines
* s390x: cleanup interrupt injectionCornelia Huck2014-06-101-1/+6
| | | | | | | Remove the need for a cpu to inject a floating interrupt on kvm. Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* s390x/kvm: enable/reset cmma via vm attributesDominik Dingel2014-06-101-0/+2
| | | | | | | | | | | | | | | | | | | Exploit the new api for userspace-controlled cmma. If supported, enable cmma during kvm initialization and register a reset handler for cmma, which is also called directly from the load IPL code. The reset functionality is needed to reset the cmma state of the guest pages, e.g. if a system reset is triggered via qemu monitor; otherwise this could result in data corruption. A guest triggered reboot may now lead to multiple cmma resets; this is OK, however, as this is slowpath anyway and the simplest way to achieve the intended effects. Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* 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>
* 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>
* misc: Use cpu_physical_memory_read and cpu_physical_memory_writeStefan Weil2014-04-271-6/+6
| | | | | | | | These functions don't need type casts (as does cpu_physical_memory_rw) and also make the code better readable. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* cputlb: Change tlb_flush_page() argument to CPUStateAndreas Färber2014-03-131-2/+4
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* translate-all: Change cpu_restore_state() argument to CPUStateAndreas Färber2014-03-131-1/+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-5/+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/+11
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* s390x/sclp: Add missing checks to SCLP handlerThomas Huth2014-02-271-1/+1
| | | | | | | | | | | If the 51 most significant bits of the SCCB address are zero or equal to the prefix, we should throw an specification exception, too. Also moved the check for privileged mode to sclp_service_call() to have all program checks in one place now. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
* s390/ebcdic: Move conversion tables to header fileHeinz Graalfs2013-09-201-80/+1Star
| | | | | | | | | | Move conversion tables to header file. - In SCLP line mode processing EBCDIC/ASCII conversion is needed. - An additional EBCDIC to ASCII conversion function is added. Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
* s390/kexec: Implement diag308 subcode 0Christian Borntraeger2013-09-201-0/+26
| | | | | | | | | This patch implements subcode 0 of diag 308. This is necessary for kexec (without kdump). The main difference to subcode 1 is that all CPUs get a full reset, instead of the architectured CPU reset (which leaves all registers untouched). Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
* cpu: Use QTAILQ for CPU listAndreas Färber2013-09-031-4/+4
| | | | | | | Introduce CPU_FOREACH(), CPU_FOREACH_SAFE() and CPU_NEXT() shorthand macros. Signed-off-by: Andreas Färber <afaerber@suse.de>
* s390: Implement load normal resetChristian Borntraeger2013-08-301-0/+30
| | | | | | | | | | | kdump on s390 uses a load normal reset to bring the system in a defined state by doing a subsystem reset. The issuing CPUs will have an initial CPU reset, all other CPUs will have a CPU reset as defined in POP (no register content will change). Implement this as architectured. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
* s390/kvm: basic implementation of diagnose 308 subcode 6Eugene (jno) Dvurechenski2013-08-301-0/+40
| | | | | | | | | | | Linux uses a check for subcode 6 to decide if other subcodes are available. Provide a minimal implementation for subcode 6, as well as for subcode 5. Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> [Move code from kvm.c into misc_helper.c]
* aio / timers: Switch entire codebase to the new timer APIAlex Bligh2013-08-221-3/+3
| | | | | | | | | | | This is an autogenerated patch using scripts/switch-timer-api. Switch the entire code base to using the new timer API. Note this patch may introduce some line length issues. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* s390: Add a hypercall registration interface.Cornelia Huck2013-01-181-1/+1
| | | | | | | | Allow virtio machines to register for different diag500 function codes and convert s390-virtio to use it. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* s390x: Remove inline function ebcdic_put and related data from cpu.hStefan Weil2013-01-181-0/+81
| | | | | | | | | | | | | | | | | | | | The function is only used in misc_helper.c, so move it to that file. This reduces the size of debug executables (compiled without optimization) because they get unused code and data for each compilation which includes cpu.h. Executables with optimization don't change their size. ebcdic2ascii is currently unused and could be removed (not done here). The array ascii2ebcdic must be accessed with an unsigned index, therefore (int)ascii[i] was replaced by (uint8_t)ascii[i]. The old code would have failed for a signed char less than 0. The current code only converts "QEMU" and spaces to EBCDIC, so there is no problem today. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* target-s390: Convert SERVCRichard Henderson2013-01-051-4/+2Star
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert STSIRichard Henderson2013-01-051-2/+2
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert STCKERichard Henderson2013-01-051-14/+0Star
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert SPX, STPXRichard Henderson2013-01-051-4/+2Star
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert SPT, STPTRichard Henderson2013-01-051-5/+3Star
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert SCKC, STCKCRichard Henderson2013-01-051-5/+3Star
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert STCKRichard Henderson2013-01-051-4/+2Star
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert SCKRichard Henderson2013-01-051-8/+0Star
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Convert STIDPRichard Henderson2013-01-051-6/+0Star
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Send signals for divideRichard Henderson2013-01-051-0/+20
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-s390: Reorg exception handlingRichard Henderson2013-01-051-4/+4
| | | | | | | | | 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>
* Merge branch 'master' of git://git.qemu.org/qemu into qom-cpuAndreas Färber2012-12-231-6/+6
|\ | | | | | | | | | | Adapt header include paths. Signed-off-by: Andreas Färber <afaerber@suse.de>
| * softmmu: move include files to include/sysemu/Paolo Bonzini2012-12-191-2/+2
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * misc: move include files to include/qemu/Paolo Bonzini2012-12-191-2/+2
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * exec: move include files to include/exec/Paolo Bonzini2012-12-191-2/+2
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | kvm: Pass CPUState to kvm_vcpu_ioctl()Andreas Färber2012-12-191-1/+1
|/ | | | | | Adapt helper functions to pass X86CPU / PowerPCCPU / S390CPU. Signed-off-by: Andreas Färber <afaerber@suse.de>
* s390: sclp base supportHeinz Graalfs2012-10-291-44/+1Star
| | | | | | | | | | | | | | | This adds a more generic infrastructure for handling Service-Call requests on s390. Currently we only support a small subset of Read SCP Info directly in target-s390x. This patch provides the base infrastructure for supporting more commands and moves Read SCP Info. In the future we could add additional commands for hotplug, call home and event handling. Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* s390: avoid reaching into memory core internalsAvi Kivity2012-10-221-2/+1Star
| | | | | | use cpu_physical_memory_is_io() instead. Signed-off-by: Avi Kivity <avi@redhat.com>
* target-s390x: Use CPU_LOG_INTRichard Henderson2012-09-271-1/+2
| | | | | | | | Three places in the interrupt code did we not honor the mask. Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-s390x: switch to AREG0 free modeBlue Swirl2012-09-101-3/+0Star
| | | | | | | | | | 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-25/+30
| | | | | | | | | 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: rename op_helper.c to misc_helper.cBlue Swirl2012-09-101-0/+428
Now op_helper.c contains miscellaneous helpers, rename it to misc_helper.c. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> [agraf: fix conflict] Signed-off-by: Alexander Graf <agraf@suse.de>