Branch: refs/heads/master Home: https://github.com/qemu/qemu Commit: 96f64aa8789451fc36396d848f397651fb999efb https://github.com/qemu/qemu/commit/96f64aa8789451fc36396d848f397651fb999efb Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017)
Changed paths: M hw/s390x/css.c M hw/s390x/s390-pci-bus.c M target/s390x/cpu_models.c M target/s390x/diag.c Log Message: ----------- S390: use g_new() family of functions Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> [PMD: more changes in hw/s390x/css.c, added target/s390x/cpu_models.c] Message-Id: <20171006235023.11952-27-f4...@amsat.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 9ea63c05d90ba85d819f9b2472ce6dfba7a403b4 https://github.com/qemu/qemu/commit/9ea63c05d90ba85d819f9b2472ce6dfba7a403b4 Author: Halil Pasic <pa...@linux.vnet.ibm.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M hw/s390x/css.c Log Message: ----------- s390x/css: be more consistent if broken beyond repair Calling do_subchannel_work with no function control flags set in SCSW is a programming error. Currently we handle this differently in do_subchannel_work_virtual and do_subchannel_work_passthrough. Let's be consistent and guard with a common assert against this programming error. Signed-off-by: Halil Pasic <pa...@linux.vnet.ibm.com> Message-Id: <20171004154144.88995-2-pa...@linux.vnet.ibm.com> Reviewed-by: Dong Jia Shi <bjsdj...@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <th...@redhat.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 6482b0ffd12ce83810c10b1a3884a75eba2ade1a https://github.com/qemu/qemu/commit/6482b0ffd12ce83810c10b1a3884a75eba2ade1a Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/cpu.h M target/s390x/excp_helper.c M target/s390x/helper.c M target/s390x/internal.h M target/s390x/interrupt.c Log Message: ----------- s390x/tcg: turn INTERRUPT_EXT into a mask External interrupts are currently all handled like floating external interrupts, they are queued. Let's prepare for a split of floating and local interrupts by turning INTERRUPT_EXT into a mask. While we can have various floating external interrupts of one kind, there is usually only one (or a fixed number) of the local external interrupts. So turn INTERRUPT_EXT into a mask and properly indicate the kind of external interrupt. Floating interrupts will have to moved out of one CPU instance later once we have SMP support. The only floating external interrupts used right now are SERVICE interrupts, so let's use that name. Following patches will clean up SERVICE interrupt injection. This get's rid of the ugly special handling for cpu timer and clock comparator interrupts. And we really only store the parameters as defined by the PoP. Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-2-da...@redhat.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: d516f74c99b1a2c289cfba0bacf125cbc9b681e3 https://github.com/qemu/qemu/commit/d516f74c99b1a2c289cfba0bacf125cbc9b681e3 Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/cpu.c M target/s390x/cpu.h M target/s390x/excp_helper.c M target/s390x/internal.h M target/s390x/interrupt.c Log Message: ----------- s390x/tcg: cleanup service interrupt injection There are still some leftovers from old virtio interrupts in there. Most importantly, we don't have to queue service interrupts anymore. Just like KVM, we can simply multiplex the SCLP service interrupts and avoid the queue. Also, now only valid parameters/cpu_addr will be stored on service interrupts. Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-3-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 14ca122e753c7bc925e6cedc4f16588bc154090d https://github.com/qemu/qemu/commit/14ca122e753c7bc925e6cedc4f16588bc154090d Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/cpu.h M target/s390x/excp_helper.c M target/s390x/internal.h M target/s390x/interrupt.c Log Message: ----------- s390x/tcg: injection of emergency signals and external calls Preparation for new TCG SIGP code. Especially also prepare for indicating that another external call is already pending. Take care of interrupt priority. Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-4-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 8417f904bad50021b432dfea12613345d9fb1f68 https://github.com/qemu/qemu/commit/8417f904bad50021b432dfea12613345d9fb1f68 Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/cpu.c M target/s390x/excp_helper.c M target/s390x/internal.h M target/s390x/interrupt.c Log Message: ----------- s390x/tcg: rework checking for deliverable interrupts Currently, enabling/disabling of interrupts is not really supported. Let's improve interrupt handling code by explicitly checking for deliverable interrupts only. This is the first step. Checking for external interrupt subclasses will be done next. Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-5-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 9dec238826361c9d7f60d26b88fd224512355c6e https://github.com/qemu/qemu/commit/9dec238826361c9d7f60d26b88fd224512355c6e Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/cpu.h M target/s390x/excp_helper.c M target/s390x/interrupt.c M target/s390x/translate.c Log Message: ----------- s390x/tcg: take care of external interrupt subclasses We can now let go of INTERRUPT_EXT. When cr0 changes, we have to revalidate if we now have a pending external interrupt, just like when the PSW (or SYSTEM MASK only) changes. Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-6-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 4beab671464450a8d2bd1d521b64ae6ab841a886 https://github.com/qemu/qemu/commit/4beab671464450a8d2bd1d521b64ae6ab841a886 Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/cpu.c Log Message: ----------- s390x/tcg: STOPPED cpus can never wake up Interrupts can't wake such CPUs up. SIGP from other CPUs has to be used to toggle the state. Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-7-da...@redhat.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 2b3394f13d2b38f0342ead78d5e60d42c29f1d4c https://github.com/qemu/qemu/commit/2b3394f13d2b38f0342ead78d5e60d42c29f1d4c Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/excp_helper.c Log Message: ----------- s390x/tcg: a CPU cannot switch state due to an interrupt Going to OPERATING here looks wrong. A CPU should even never be !OPERATING at this point. Unhalting will already be done in cpu_handle_halt() if there is work, so we can drop this statement completely. Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-8-da...@redhat.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 83f7f32901c630f4fc01acd0d9082da466b17102 https://github.com/qemu/qemu/commit/83f7f32901c630f4fc01acd0d9082da466b17102 Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/helper.c M target/s390x/internal.h M target/s390x/kvm.c Log Message: ----------- target/s390x: factor out handling of WAIT PSW into s390_handle_wait() This will now also detect crashes under TCG. We can directly use cpu->env.psw.addr instead of kvm_run, as we do a cpu_synchronize_state(). Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-9-da...@redhat.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: f1cbfe6a736cf5a676fcdafcafdeb24125358c4e https://github.com/qemu/qemu/commit/f1cbfe6a736cf5a676fcdafcafdeb24125358c4e Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/excp_helper.c Log Message: ----------- s390x/tcg: handle WAIT PSWs during interrupt injection If we encounter a WAIT PSW, we have to halt immediately. Using cpu_loop_exit() at this point feels wrong. Simply leaving cs->exception_index set doesn't result in an immediate stop. This is also necessary to properly handle SIGP STOP interrupts later. The CPU_INTERRUPT_HALT will be processed immediately and properly set the CPU to halted (also resetting cs->exception_index to EXCP_HLT) Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-10-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: c6892047dc15a9106a1657b07ed1c915cabc8a06 https://github.com/qemu/qemu/commit/c6892047dc15a9106a1657b07ed1c915cabc8a06 Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/helper.c Log Message: ----------- target/s390x: interpret PSW_MASK_WAIT only for TCG KVM handles the wait PSW itself and triggers a WAIT ICPT in case it really wants to sleep (disabled wait). This will later allow us to change the order of loading a restart interrupt and setting a CPU to OPERATING on SIGP RESTART without changing KVM behavior. Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-11-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 27292ff18d0b398ed6ea6db22e1720aebcbaa991 https://github.com/qemu/qemu/commit/27292ff18d0b398ed6ea6db22e1720aebcbaa991 Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/kvm.c Log Message: ----------- s390x/kvm: pass ipb directly into handle_sigp() No need to pass kvm_run. Pass parameters alphabetically ordered. Reviewed-by: Thomas Huth <th...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-12-da...@redhat.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: eabcea18f835178c1f8f088f88bf00e379f09438 https://github.com/qemu/qemu/commit/eabcea18f835178c1f8f088f88bf00e379f09438 Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/internal.h M target/s390x/interrupt.c M target/s390x/kvm-stub.c M target/s390x/kvm.c M target/s390x/kvm_s390x.h Log Message: ----------- s390x/kvm: generalize SIGP stop and restart interrupt injection Preparation for factoring it out into !kvm code. Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-13-da...@redhat.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: cf729baaec3fceff31ea8f41e34fbc7e2475916d https://github.com/qemu/qemu/commit/cf729baaec3fceff31ea8f41e34fbc7e2475916d Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/helper.c M target/s390x/internal.h M target/s390x/kvm.c Log Message: ----------- s390x/kvm: factor out storing of CPU status Factor it out into s390_store_status(), to be used also by TCG later on. Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-14-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: f875cb0c2180e182585dc00151e2cf74d20e7c8c https://github.com/qemu/qemu/commit/f875cb0c2180e182585dc00151e2cf74d20e7c8c Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/helper.c M target/s390x/internal.h M target/s390x/kvm.c Log Message: ----------- s390x/kvm: factor out storing of adtl CPU status Called from SIGP code to be factored out, so let's move it. Add a FIXME for TCG code in the future. Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-15-da...@redhat.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: a7a2b8e3d57582df2f176069d57c1ddae667387d https://github.com/qemu/qemu/commit/a7a2b8e3d57582df2f176069d57c1ddae667387d Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/kvm.c Log Message: ----------- s390x/kvm: drop two debug prints Preparation for moving it out of kvm.c. Reviewed-by: Thomas Huth <th...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-16-da...@redhat.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 74b4c74d5efb0a489bdf0acc5b5d0197167e7649 https://github.com/qemu/qemu/commit/74b4c74d5efb0a489bdf0acc5b5d0197167e7649 Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M MAINTAINERS M hw/s390x/s390-virtio-ccw.c M target/s390x/Makefile.objs M target/s390x/cpu.c M target/s390x/cpu.h M target/s390x/internal.h M target/s390x/kvm-stub.c M target/s390x/kvm.c M target/s390x/kvm_s390x.h A target/s390x/sigp.c M target/s390x/trace-events Log Message: ----------- s390x/kvm: factor out SIGP code into sigp.c We want to use the same code base for TCG, so let's cleanly factor it out. The sigp mutex is currently not really needed, as everything is protected by the iothread mutex. But this could change later, so leave it in place and initialize it properly from common code. Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-17-da...@redhat.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 3047f8b549a5af0027d7921ed9dbeba233895ab9 https://github.com/qemu/qemu/commit/3047f8b549a5af0027d7921ed9dbeba233895ab9 Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/internal.h M target/s390x/kvm.c M target/s390x/sigp.c Log Message: ----------- s390x/kvm: factor out actual handling of STOP interrupts For KVM, the KVM module decides when a STOP can be performed (when the STOP interrupt can be processed). Factor it out so we can use it later for TCG. Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-19-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: d1b468bc88692fef99601ef09b6fcc350f29de40 https://github.com/qemu/qemu/commit/d1b468bc88692fef99601ef09b6fcc350f29de40 Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/cpu.h M target/s390x/sigp.c Log Message: ----------- s390x/tcg: implement SIGP SENSE RUNNING STATUS Preparation for TCG, for KVM is this is completely handled in the kernel. Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-20-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 302230fc449a5778dfb703e7fc2f2bdfe71dcd9d https://github.com/qemu/qemu/commit/302230fc449a5778dfb703e7fc2f2bdfe71dcd9d Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/sigp.c Log Message: ----------- s390x/tcg: implement SIGP SENSE Add it as preparation for TCG. Sensing could later be done completely lockless. Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-21-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 070aa1a49389e04c49b4f5742d4184d253be5547 https://github.com/qemu/qemu/commit/070aa1a49389e04c49b4f5742d4184d253be5547 Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/sigp.c Log Message: ----------- s390x/tcg: implement SIGP EXTERNAL CALL As preparation for TCG. Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-22-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: c50105d47c3e13108d4d6d37360c4b105a81ab32 https://github.com/qemu/qemu/commit/c50105d47c3e13108d4d6d37360c4b105a81ab32 Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/sigp.c Log Message: ----------- s390x/tcg: implement SIGP EMERGENCY SIGNAL As preparation for TCG. Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-23-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: a6880d213b371cec59f780ed16a99f0b1e0df88d https://github.com/qemu/qemu/commit/a6880d213b371cec59f780ed16a99f0b1e0df88d Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/cpu.h M target/s390x/sigp.c Log Message: ----------- s390x/tcg: implement SIGP CONDITIONAL EMERGENCY SIGNAL Mostly analogous to the kernel/KVM version (so I assume the checks are correct :) ). As a preparation for TCG. Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-24-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: b1ab5f6068c059b1357209c1dbeaac772184977d https://github.com/qemu/qemu/commit/b1ab5f6068c059b1357209c1dbeaac772184977d Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/cpu.h M target/s390x/excp_helper.c M target/s390x/helper.c M target/s390x/internal.h M target/s390x/interrupt.c M target/s390x/sigp.c Log Message: ----------- s390x/tcg: implement STOP and RESET interrupts for TCG Implement them like KVM implements/handles them. Both can only be triggered via SIGP instructions. RESET has (almost) the lowest priority if the CPU is running, and the highest if the CPU is STOPPED. This is handled in SIGP code already. On delivery, we only have to care about the "CPU running" scenario. STOP is defined to be delivered after all other interrupts have been delivered. Therefore it has the actual lowest priority. As both can wake up a CPU if sleeping, indicate them correctly to external code (e.g. cpu_has_work()). Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-25-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: b376a5545a73c4ae5d19741afa7b2074d31a3a3f https://github.com/qemu/qemu/commit/b376a5545a73c4ae5d19741afa7b2074d31a3a3f Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/sigp.c Log Message: ----------- s390x/tcg: flush the tlb on SIGP SET PREFIX Thanks to Aurelien Jarno for doing this in his prototype. We can flush the whole TLB as this should happen really rarely. Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-26-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 11b0079cec6b1f46ba76cca634051bee4474d323 https://github.com/qemu/qemu/commit/11b0079cec6b1f46ba76cca634051bee4474d323 Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M hw/s390x/s390-virtio-ccw.c M target/s390x/helper.h M target/s390x/insn-data.def M target/s390x/misc_helper.c M target/s390x/translate.c Log Message: ----------- s390x/tcg: switch to new SIGP handling code This effectively enables experimental SMP support. Floating interrupts are still a mess, so allow it but print a big warning. There also seems to be a problem with CPU hotplug (after the main loop started). Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-27-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> [CH: changed insn-data.def as pointed out by Richard] Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: ca26c5d32b08a491cc138e4b8a9c6c774fb62d40 https://github.com/qemu/qemu/commit/ca26c5d32b08a491cc138e4b8a9c6c774fb62d40 Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/cpu_models.c Log Message: ----------- s390x/cpumodel: allow to enable SENSE RUNNING STATUS for qemu As we properly implement it, allow to enable it. Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-28-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 0fc60ca58aa250b4f11f8c69d0be097e0140e7df https://github.com/qemu/qemu/commit/0fc60ca58aa250b4f11f8c69d0be097e0140e7df Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M hw/s390x/s390-virtio-ccw.c M target/s390x/sigp.c Log Message: ----------- s390x/tcg: unlock NMI Nothing hindering us anymore from unlocking the restart code (used for NMI). Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-29-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: f74990a5d019751c545e9800a3376b6336e77d38 https://github.com/qemu/qemu/commit/f74990a5d019751c545e9800a3376b6336e77d38 Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/misc_helper.c M target/s390x/translate.c Log Message: ----------- s390x/tcg: refactor stfl(e) to use s390_get_feat_block() Refactor it to use s390_get_feat_block(). Directly write into the mapped lowcore with stfl and make sure it is really only compiled if needed. While at it, add an alignment check for STFLE and avoid potential_page_fault() by properly restoring the CPU state. Due to s390_get_feat_block(), we will now also indicate the "Configuration-z-architectural-mode", which is with new SIGP code the right thing to do. Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-30-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 741a4ec186160b632b6e19d2ad9623bc0121ea5d https://github.com/qemu/qemu/commit/741a4ec186160b632b6e19d2ad9623bc0121ea5d Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/cpu.c M target/s390x/sigp.c Log Message: ----------- target/s390x: special handling when starting a CPU with WAIT PSW When we try to start a CPU with a WAIT PSW, we have to take care that TCG will actually try to continue executing instructions. We must therefore really only unhalt the CPU if we don't have a WAIT PSW. Also document the special order for restart interrupts, which load a new PSW and change the state to operating. To keep KVM working, simply don't have a look at the WAIT bit when loading the PSW. Otherwise the behavior of a restart interrupt when a CPU stopped would be changed. Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20170928203708.9376-31-da...@redhat.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 3382cf1fabbf722dce931846853dae711838e720 https://github.com/qemu/qemu/commit/3382cf1fabbf722dce931846853dae711838e720 Author: Farhan Ali <al...@linux.vnet.ibm.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M hw/s390x/virtio-ccw.c M hw/s390x/virtio-ccw.h Log Message: ----------- virtio-ccw: Add the virtio-input devices for CCW bus Wire up the virtio-input HID devices (keyboard, mouse, tablet) for the CCW bus. The virtio-input is a virtio-1 device, so disable legacy revision 0. Signed-off-by: Farhan Ali <al...@linux.vnet.ibm.com> Reviewed-by: Halil Pasic <pa...@linux.vnet.ibm.com> Reviewed-by: Christian Borntraeger <borntrae...@de.ibm.com> Message-Id: <6a8ea4c503ee32c2ca7fa608b5f2f547009be8ee.1507557166.git.al...@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <th...@redhat.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 146bd283ff419299eb957695659ff3ece8259afd https://github.com/qemu/qemu/commit/146bd283ff419299eb957695659ff3ece8259afd Author: Cornelia Huck <coh...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M MAINTAINERS Log Message: ----------- s390x/MAINTAINERS: add mailing list There's a new qemu-s3...@nongnu.org mailing list: add it to the s390 sections. Reviewed-by: Thomas Huth <th...@redhat.com> Acked-by: Christian Borntraeger <borntrae...@de.ibm.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 67915de9f0383ccf4ab8c42dd02aa18dcd79b411 https://github.com/qemu/qemu/commit/67915de9f0383ccf4ab8c42dd02aa18dcd79b411 Author: Cornelia Huck <cornelia.h...@de.ibm.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M hw/s390x/event-facility.c M include/hw/s390x/event-facility.h Log Message: ----------- s390x/event-facility: variable-length event masks The architecture supports masks of variable length for sclp write event mask. We currently only support 4 byte event masks, as that is what Linux uses. Let's extend this to the maximum mask length supported by the architecture and return 0 to the guest for the mask bits we don't support in core. Initial patch by: Cornelia Huck <cornelia.h...@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.h...@de.ibm.com> Signed-off-by: Jason J. Herne <jjhe...@linux.vnet.ibm.com> Message-Id: <1507729193-9747-1-git-send-email-jjhe...@linux.vnet.ibm.com> Acked-by: Christian Borntraeger <borntrae...@de.ibm.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: ac7e4cbbabae5a8e0d3948ddebf33351e61497c3 https://github.com/qemu/qemu/commit/ac7e4cbbabae5a8e0d3948ddebf33351e61497c3 Author: Igor Mammedov <imamm...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/helper.c Log Message: ----------- s390x: fix cpu object referrence leak in s390x_new_cpu() object_new() returns cpu with refcnt == 1 and after realize refcnt == 2*. s390x_new_cpu() as an owner of the first refcnt should have released it on exit in both cases (on error and success) to avoid it leaking. Do so for both cases. Signed-off-by: Igor Mammedov <imamm...@redhat.com> Message-Id: <1508247680-98800-2-git-send-email-imamm...@redhat.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 32dc6aa061e76c9acaefff1faa48ab479672ea53 https://github.com/qemu/qemu/commit/32dc6aa061e76c9acaefff1faa48ab479672ea53 Author: Igor Mammedov <imamm...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M hw/s390x/s390-virtio-ccw.c M target/s390x/cpu.h M target/s390x/helper.c Log Message: ----------- s390x: move s390x_new_cpu() into board code s390-virtio-ccw.c is the sole user of s390x_new_cpu(), so move this helper there. Signed-off-by: Igor Mammedov <imamm...@redhat.com> Message-Id: <1508253203-119237-1-git-send-email-imamm...@redhat.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: e443ef9f21acdc6459b3fbad04019a40ea8c4e80 https://github.com/qemu/qemu/commit/e443ef9f21acdc6459b3fbad04019a40ea8c4e80 Author: Halil Pasic <pa...@linux.vnet.ibm.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M include/hw/s390x/css.h Log Message: ----------- s390x/css: IO instr handler ending control CSS code needs to tell the IO instruction handlers located in ioinst.c how the emulated instruction should be ended. Currently this is done by returning generic (POSIX) error codes, and mapping them to outcomes like condition codes. This makes bugs easy to create and hard to recognize. As a preparation for moving away from (mis)using generic error codes for flow control let us introduce a type which tells the instruction handler function how to end the instruction, in a more straight-forward and less ambiguous way. Signed-off-by: Halil Pasic <pa...@linux.vnet.ibm.com> Message-Id: <20171017140453.51099-3-pa...@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <th...@redhat.com> Reviewed-by: Dong Jia Shi <bjsdj...@linux.vnet.ibm.com> [CH: cosmetic changes] Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 66dc50f7057b9a0191f54e55764412202306858d https://github.com/qemu/qemu/commit/66dc50f7057b9a0191f54e55764412202306858d Author: Halil Pasic <pa...@linux.vnet.ibm.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M hw/s390x/css.c M hw/s390x/s390-ccw.c M hw/vfio/ccw.c M include/hw/s390x/css.h M include/hw/s390x/s390-ccw.h M target/s390x/ioinst.c Log Message: ----------- s390x: improve error handling for SSCH and RSCH Simplify the error handling of the SSCH and RSCH handler avoiding arbitrary and cryptic error codes being used to tell how the instruction is supposed to end. Let the code detecting the condition tell how it's to be handled in a less ambiguous way. It's best to handle SSCH and RSCH in one go as the emulation of the two shares a lot of code. For passthrough this change isn't pure refactoring, but changes the way kernel reported EFAULT is handled. After clarifying the kernel interface we decided that EFAULT shall be mapped to unit exception. Same goes for unexpected error codes and absence of required ORB flags. Signed-off-by: Halil Pasic <pa...@linux.vnet.ibm.com> Message-Id: <20171017140453.51099-4-pa...@linux.vnet.ibm.com> Tested-by: Dong Jia Shi <bjsdj...@linux.vnet.ibm.com> [CH: cosmetic changes] Reviewed-by: Dong Jia Shi <bjsdj...@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 963764081d84f25ecc6aff0d49e074c150910e6a https://github.com/qemu/qemu/commit/963764081d84f25ecc6aff0d49e074c150910e6a Author: Halil Pasic <pa...@linux.vnet.ibm.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M hw/s390x/css.c M include/hw/s390x/css.h M target/s390x/ioinst.c Log Message: ----------- s390x: refactor error handling for XSCH handler Simplify the error handling of the XSCH. Let the code detecting the condition tell (in a less ambiguous way) how it's to be handled. No changes in behavior. Signed-off-by: Halil Pasic <pa...@linux.vnet.ibm.com> Message-Id: <20171017140453.51099-5-pa...@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <th...@redhat.com> Reviewed-by: Dong Jia Shi <bjsdj...@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 773314426e1ca31e0fcfe137755d43d06eedb0bb https://github.com/qemu/qemu/commit/773314426e1ca31e0fcfe137755d43d06eedb0bb Author: Halil Pasic <pa...@linux.vnet.ibm.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M hw/s390x/css.c M include/hw/s390x/css.h M target/s390x/ioinst.c Log Message: ----------- s390x: refactor error handling for CSCH handler Simplify the error handling of the CSCH. Let the code detecting the condition tell (in a less ambiguous way) how it's to be handled. No changes in behavior. Signed-off-by: Halil Pasic <pa...@linux.vnet.ibm.com> Message-Id: <20171017140453.51099-6-pa...@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <th...@redhat.com> Reviewed-by: Dong Jia Shi <bjsdj...@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: ae9f1be3bd99cbc5b029082c5e52a24222b4fb66 https://github.com/qemu/qemu/commit/ae9f1be3bd99cbc5b029082c5e52a24222b4fb66 Author: Halil Pasic <pa...@linux.vnet.ibm.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M hw/s390x/css.c M include/hw/s390x/css.h M target/s390x/ioinst.c Log Message: ----------- s390x: refactor error handling for HSCH handler Simplify the error handling of the HSCH. Let the code detecting the condition tell (in a less ambiguous way) how it's to be handled. No changes in behavior. Signed-off-by: Halil Pasic <pa...@linux.vnet.ibm.com> Message-Id: <20171017140453.51099-7-pa...@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <th...@redhat.com> Reviewed-by: Dong Jia Shi <bjsdj...@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 6bb6f19473e2f28334bed14740d64afb6cb6a4e5 https://github.com/qemu/qemu/commit/6bb6f19473e2f28334bed14740d64afb6cb6a4e5 Author: Halil Pasic <pa...@linux.vnet.ibm.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M hw/s390x/css.c M include/hw/s390x/css.h M target/s390x/ioinst.c Log Message: ----------- s390x: refactor error handling for MSCH handler Simplify the error handling of the MSCH. Let the code detecting the condition tell (in a less ambiguous way) how it's to be handled. No changes in behavior. Signed-off-by: Halil Pasic <pa...@linux.vnet.ibm.com> Message-Id: <20171017140453.51099-8-pa...@linux.vnet.ibm.com> [CH: fix return code for fctl != 0] Reviewed-by: Dong Jia Shi <bjsdj...@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 78b27bade1faf91435eae4bdcb7444dcf35f44bf https://github.com/qemu/qemu/commit/78b27bade1faf91435eae4bdcb7444dcf35f44bf Author: Eric Blake <ebl...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M tests/boot-order-test.c M tests/boot-serial-test.c M tests/endianness-test.c M tests/ipmi-bt-test.c M tests/libqtest.c M tests/libqtest.h M tests/m25p80-test.c M tests/pnv-xscom-test.c M tests/prom-env-test.c M tests/tco-test.c M tests/test-filter-mirror.c M tests/test-filter-redirector.c M tests/virtio-blk-test.c M tests/vmgenid-test.c Log Message: ----------- libqtest: Add qtest_[v]startf() We have several callers that were formatting the argument strings themselves; consolidate this effort by adding new convenience functions directly in libqtest, and update some call-sites that can benefit from it. Note that the new functions qtest_startf() and qtest_vstartf() behave more like qtest_init() (the caller must assign global_qtest after the fact, rather than getting it implicitly set). This helps us prepare for future patches that get rid of the global variable, by explicitly highlighting which tests still depend on it now. Signed-off-by: Eric Blake <ebl...@redhat.com> [thuth: Dropped the hunks that do not apply cleanly to qemu master yet and added the missing g_free(args) in qtest_vstartf()] Signed-off-by: Thomas Huth <th...@redhat.com> Message-Id: <1508336428-20511-2-git-send-email-th...@redhat.com> Acked-by: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: d0a5cc5bf4cf8e4d7d14597dd57be526c3e9d76f https://github.com/qemu/qemu/commit/d0a5cc5bf4cf8e4d7d14597dd57be526c3e9d76f Author: Thomas Huth <th...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M tests/Makefile.include M tests/virtio-balloon-test.c M tests/virtio-console-test.c M tests/virtio-serial-test.c Log Message: ----------- tests: Enable the very simple virtio tests on s390x, too These tests can easily be used on s390x, too. We just have to make sure to use the virtio-xxx-ccw devices instead of virtio-xxx-pci. Signed-off-by: Thomas Huth <th...@redhat.com> Message-Id: <1508336428-20511-3-git-send-email-th...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Acked-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: Christian Borntraeger <borntrae...@de.ibm.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: f52bfb12143e29d7c8bd827bdb751aee47a9694e https://github.com/qemu/qemu/commit/f52bfb12143e29d7c8bd827bdb751aee47a9694e Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M accel/tcg/cputlb.c M accel/tcg/softmmu_template.h M include/exec/cpu-all.h Log Message: ----------- accel/tcg: allow to invalidate a write TLB entry immediately Background: s390x implements Low-Address Protection (LAP). If LAP is enabled, writing to effective addresses (before any translation) 0-511 and 4096-4607 triggers a protection exception. So we have subpage protection on the first two pages of every address space (where the lowcore - the CPU private data resides). By immediately invalidating the write entry but allowing the caller to continue, we force every write access onto these first two pages into the slow path. we will get a tlb fault with the specific accessed addresses and can then evaluate if protection applies or not. We have to make sure to ignore the invalid bit if tlb_fill() succeeds. Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20171016202358.3633-2-da...@redhat.com> Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 2bcf018340cbf233f7145e643fc1bb367f23fd90 https://github.com/qemu/qemu/commit/2bcf018340cbf233f7145e643fc1bb367f23fd90 Author: David Hildenbrand <da...@redhat.com> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M target/s390x/excp_helper.c M target/s390x/mem_helper.c M target/s390x/mmu_helper.c Log Message: ----------- s390x/tcg: low-address protection support This is a neat way to implement low address protection, whereby only the first 512 bytes of the first two pages (each 4096 bytes) of every address space are protected. Store a tec of 0 for the access exception, this is what is defined by Enhanced Suppression on Protection in case of a low address protection (Bit 61 set to 0, rest undefined). We have to make sure to to pass the access address, not the masked page address into mmu_translate*(). Drop the check from testblock. So we can properly test this via kvm-unit-tests. This will check every access going through one of the MMUs. Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Signed-off-by: David Hildenbrand <da...@redhat.com> Message-Id: <20171016202358.3633-3-da...@redhat.com> [CH: restored error message for access register mode] Signed-off-by: Cornelia Huck <coh...@redhat.com> Commit: 718757eca98ea8bd5b5354eb70acf050dd49b862 https://github.com/qemu/qemu/commit/718757eca98ea8bd5b5354eb70acf050dd49b862 Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2017-10-20 (Fri, 20 Oct 2017) Changed paths: M MAINTAINERS M accel/tcg/cputlb.c M accel/tcg/softmmu_template.h M hw/s390x/css.c M hw/s390x/event-facility.c M hw/s390x/s390-ccw.c M hw/s390x/s390-pci-bus.c M hw/s390x/s390-virtio-ccw.c M hw/s390x/virtio-ccw.c M hw/s390x/virtio-ccw.h M hw/vfio/ccw.c M include/exec/cpu-all.h M include/hw/s390x/css.h M include/hw/s390x/event-facility.h M include/hw/s390x/s390-ccw.h M target/s390x/Makefile.objs M target/s390x/cpu.c M target/s390x/cpu.h M target/s390x/cpu_models.c M target/s390x/diag.c M target/s390x/excp_helper.c M target/s390x/helper.c M target/s390x/helper.h M target/s390x/insn-data.def M target/s390x/internal.h M target/s390x/interrupt.c M target/s390x/ioinst.c M target/s390x/kvm-stub.c M target/s390x/kvm.c M target/s390x/kvm_s390x.h M target/s390x/mem_helper.c M target/s390x/misc_helper.c M target/s390x/mmu_helper.c A target/s390x/sigp.c M target/s390x/trace-events M target/s390x/translate.c M tests/Makefile.include M tests/boot-order-test.c M tests/boot-serial-test.c M tests/endianness-test.c M tests/ipmi-bt-test.c M tests/libqtest.c M tests/libqtest.h M tests/m25p80-test.c M tests/pnv-xscom-test.c M tests/prom-env-test.c M tests/tco-test.c M tests/test-filter-mirror.c M tests/test-filter-redirector.c M tests/virtio-balloon-test.c M tests/virtio-blk-test.c M tests/virtio-console-test.c M tests/virtio-serial-test.c M tests/vmgenid-test.c Log Message: ----------- Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20171020' into staging The last big chunk of s390x changes: - (experimental) smp support under tcg - provide the virtio-input devices for virtio-ccw - improve error handling in the css code - enable some simple virtio tests for s390x - low-address protection in tcg - some more cleanups and fixes # gpg: Signature made Fri 20 Oct 2017 12:49:22 BST # gpg: using RSA key 0xDECF6B93C6F02FAF # gpg: Good signature from "Cornelia Huck <co...@cornelia-huck.de>" # gpg: aka "Cornelia Huck <hu...@linux.vnet.ibm.com>" # gpg: aka "Cornelia Huck <cornelia.h...@de.ibm.com>" # gpg: aka "Cornelia Huck <coh...@kernel.org>" # gpg: aka "Cornelia Huck <coh...@redhat.com>" # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * remotes/cohuck/tags/s390x-20171020: (46 commits) s390x/tcg: low-address protection support accel/tcg: allow to invalidate a write TLB entry immediately tests: Enable the very simple virtio tests on s390x, too libqtest: Add qtest_[v]startf() s390x: refactor error handling for MSCH handler s390x: refactor error handling for HSCH handler s390x: refactor error handling for CSCH handler s390x: refactor error handling for XSCH handler s390x: improve error handling for SSCH and RSCH s390x/css: IO instr handler ending control s390x: move s390x_new_cpu() into board code s390x: fix cpu object referrence leak in s390x_new_cpu() s390x/event-facility: variable-length event masks s390x/MAINTAINERS: add mailing list virtio-ccw: Add the virtio-input devices for CCW bus target/s390x: special handling when starting a CPU with WAIT PSW s390x/tcg: refactor stfl(e) to use s390_get_feat_block() s390x/tcg: unlock NMI s390x/cpumodel: allow to enable SENSE RUNNING STATUS for qemu s390x/tcg: switch to new SIGP handling code ... Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Compare: https://github.com/qemu/qemu/compare/27825bc954f8...718757eca98e