summaryrefslogtreecommitdiff
path: root/target-s390x
AgeCommit message (Collapse)AuthorFilesLines
2012-12-23Merge branch 'master' of git://git.qemu.org/qemu into qom-cpuAndreas Färber12-32/+32
Adapt header include paths. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-12-19cpu: Move kvm_run into CPUStateAndreas Färber1-36/+41
Pass CPUState / {X86,S390}CPU to helper functions. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-12-19cpu: Move kvm_state field into CPUStateAndreas Färber1-3/+2
Adapt some functions to take CPUState / {PowerPC,S390}CPU argument. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-12-19kvm: Pass CPUState to kvm_vcpu_ioctl()Andreas Färber4-37/+42
Adapt helper functions to pass X86CPU / PowerPCCPU / S390CPU. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-12-19kvm: Pass CPUState to kvm_arch_*Andreas Färber1-13/+25
Move kvm_vcpu_dirty field into CPUState to simplify things and change its type to bool while at it. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-12-19fpu: move public header file to include/fpuPaolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19softmmu: move include files to include/sysemu/Paolo Bonzini4-7/+7
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19misc: move include files to include/qemu/Paolo Bonzini6-7/+7
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19qom: move include files to include/qom/Paolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19exec: move include files to include/exec/Paolo Bonzini7-15/+15
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19build: kill libdis, move disassemblers to disas/Paolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-16exec: refactor cpu_restore_stateBlue Swirl1-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>
2012-12-08TCG: Use gen_opc_instr_start from context instead of global variable.Evgeny Voevodin1-3/+3
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-12-08TCG: Use gen_opc_icount from context instead of global variable.Evgeny Voevodin1-1/+1
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-12-08TCG: Use gen_opc_pc from context instead of global variable.Evgeny Voevodin1-2/+2
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-11-17TCG: Use gen_opc_buf from context instead of global variable.Evgeny Voevodin1-3/+3
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-11-17TCG: Use gen_opc_ptr from context instead of global variable.Evgeny Voevodin1-4/+5
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-11-10disas: avoid using cpu_single_envBlue Swirl1-1/+1
Pass around CPUArchState instead of using global cpu_single_env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Acked-by: Richard Henderson <rth@twiddle.net> Acked-by: Aurelien Jarno <aurelien@aurel32.net> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
2012-10-31cpus: Pass CPUState to [qemu_]cpu_has_work()Andreas Färber1-1/+3
For target-mips also change the return type to bool. Make include paths for cpu-qom.h consistent for alpha and unicore32. Signed-off-by: Andreas Färber <afaerber@suse.de> [AF: Updated new target-openrisc function accordingly] Acked-by: Richard Henderson <rth@twiddle.net> (for alpha)
2012-10-31cpus: Pass CPUState to qemu_cpu_kick()Andreas Färber1-1/+1
CPUArchState is no longer needed there. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-29s390: sclp base supportHeinz Graalfs3-60/+3
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>
2012-10-29s390: use sync regs for register transferChristian Borntraeger1-20/+92
Newer kernels provide the guest registers in kvm_run. Lets use those if available (i.e. the capability is set). This avoids ioctls on cpu_synchronize_state making intercepts faster. In addition, we have now the prefix register, the access registers the control registers up to date. This helps in certain cases, e.g. for resolving kernel module addresses with gdb on a guest. On return, we update the registers according to the level statement, i.e. we put all registers for KVM_PUT_FULL_STATE and _RESET_STATE. 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>
2012-10-28target-s390x: rename helper flagsAurelien Jarno1-38/+38
Rename helper flags to the new ones. This is purely a mechanical change, it's possible to use better flags by looking at the helpers. Cc: Alexander Graf <agraf@suse.de> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-10-23Rename target_phys_addr_t to hwaddrAvi Kivity3-10/+10
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>
2012-10-22s390: avoid reaching into memory core internalsAvi Kivity1-2/+1
use cpu_physical_memory_is_io() instead. Signed-off-by: Avi Kivity <avi@redhat.com>
2012-09-27target-s390x: Tidy cpu_dump_stateRichard Henderson1-12/+10
The blank lines inside the single dump make it difficult for the eye to pick out the block. Worse, with interior newlines, but no blank line following, the PSW line appears to belong to the next dump block. Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-09-27target-s390x: Avoid double CPU_LOG_TB_CPURichard Henderson1-1/+0
This is already handled generically in cpu_exec. Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-09-27target-s390x: Use CPU_LOG_INTRichard Henderson2-4/+6
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>
2012-09-27target-s390x: Call tcg_gen_debug_insn_startRichard Henderson1-4/+5
Cc: Alexander Graf <agraf@suse.de> Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-09-15target-s390x: avoid cpu_single_envBlue Swirl1-173/+183
Pass around CPUState instead of using global cpu_single_env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-09-10target-s390x: switch to AREG0 free modeBlue Swirl8-290/+238
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>
2012-09-10target-s390x: avoid AREG0 for misc helpersBlue Swirl5-56/+60
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>
2012-09-10target-s390x: avoid AREG0 for condition code helpersBlue Swirl4-20/+18
Make condition code helpers take a parameter for CPUState instead of relying on global env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-09-10target-s390x: avoid AREG0 for integer helpersBlue Swirl4-20/+19
Make integer helpers take a parameter for CPUState instead of relying on global env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-09-10target-s390x: avoid AREG0 for FPU helpersBlue Swirl7-191/+257
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>
2012-09-10target-s390x: rename op_helper.c to misc_helper.cBlue Swirl3-5/+5
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>
2012-09-10target-s390x: split memory access helpersBlue Swirl3-1159/+1193
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>
2012-09-10target-s390x: split integer helpersBlue Swirl3-171/+203
Move integer helpers to int_helper.c. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-09-10target-s390x: split condition code helpersBlue Swirl4-522/+557
Move condition code helpers to cc_helper.c. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-09-10target-s390x: split FPU opsBlue Swirl5-810/+847
Move floating point instructions to fpu_helper.c. While exporting some condition code helpers, avoid duplicate identifier conflict with translate.c. Remove unused set_cc_nz_f64() in translate.c. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-09-10target-s390x: fix styleBlue Swirl2-237/+297
Before splitting op_helper.c and helper.c in the next patches, fix style issues. No functional changes. Replace also GCC specific __FUNCTION__ with standard __func__. Don't init static variable (cpu_s390x_init:inited) with 0. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15s390: provide interface for service interrupt/introduce interrupt.cChristian Borntraeger4-16/+34
This patch creates interrupt.c. The first user is a callback for hw/* code to trigger an service interrupt for a given sccb value. Several interrupt types for s390 are floating (can be delivered to all CPUs). so this code does not belong to a specific CPU. Other interrupts (like the virtio one) are also floating and can be moved here later on. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15s390: Fix error handling and condition code of service callChristian Borntraeger2-11/+21
Invalid sccb addresses will cause specification or addressing exception. Lets add those checks. Furthermore, the good case (cc=0) was incorrect for KVM, we did not set the CC at all. We now use return codes < 0 as program checks and return codes > 0 as condition code values. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-07-10s390: autodetect map privateChristian Borntraeger1-0/+35
By default qemu will use MAP_PRIVATE for guest pages. This will write protect pages and thus break on s390 systems that dont support this feature. Therefore qemu has a hack to always use MAP_SHARED for s390. But MAP_SHARED has other problems (no dirty pages tracking, a lot more swap overhead etc.) Newer systems allow the distinction via KVM_CAP_S390_COW. With this feature qemu can use the standard qemu alloc if available, otherwise it will use the old s390 hack. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Acked-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-06-24Merge branch 's390-for-upstream' of git://repo.or.cz/qemu/agrafBlue Swirl1-0/+1
* 's390-for-upstream' of git://repo.or.cz/qemu/agraf: s390: stop target cpu on sigp initial reset s390: make kvm_stat work on s390 kvm: Update kernel headers s390x: fix s390 virtio aliases
2012-06-21qemu-log: use LOG_UNIMP for some target CPU casesBlue Swirl1-1/+1
Use LOG_UNIMP for some target CPU cases. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Acked-by: Alexander Graf <agraf@suse.de>
2012-06-18s390: stop target cpu on sigp initial resetChristian Borntraeger1-0/+1
We must not run the target cpu after an initial reset. This makes system_reset more reliable for smp guests. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-06-11target-s390x: Pass S390CPU to s390_cpu_restart()Andreas Färber1-2/+4
Needed for qemu_cpu_kick(). Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-11s390-virtio: Let s390_cpu_addr2state() return S390CPUAndreas Färber2-3/+5
Convert ipi_states to S390CPU**. Needed for s390_cpu_restart() in handle_sigp(). Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-11target-s390x: Let cpu_s390x_init() return S390CPUAndreas Färber3-7/+7
Let cpu_init() return CPUS390XState for backwards compatibility. Signed-off-by: Andreas Färber <afaerber@suse.de>