s390x, qtest and misc patches before the 8.1 soft freeze
Hi Richard!
The following changes since commit fcb237e64f9d026c03d635579c7b288d0008a6e5:
Merge tag 'pull-vfio-20230710' of https://github.com/legoater/qemu into staging (2023-07-10 09:17:06 +0100)
are available in the Git repository at:
https://gitlab.com/thuth/qemu.git tags/pull-request-2023-07-10v2
for you to fetch changes up to 7233bd122370155abfd75a42c86a9087ca5a8dbf:
docs/devel: Fix coding style in style.rst (2023-07-10 15:34:57 +0200)
----------------------------------------------------------------
* s390x instruction emulation fixes and corresponding TCG tests
* Extend the readconfig qtest
* Introduce "-run-with chroot=..." and deprecate the old "-chroot" option
* Speed up migration tests
* Fix coding style in the coding style document
----------------------------------------------------------------
Daniel P. Berrangé (1):
tests/qtest: massively speed up migration-test
Ilya Leoshkevich (13):
linux-user: elfload: Add more initial s390x PSW bits
target/s390x: Fix EPSW CC reporting
target/s390x: Fix MDEB and MDEBR
target/s390x: Fix MVCRL with a large value in R0
target/s390x: Fix LRA overwriting the top 32 bits on DAT error
target/s390x: Fix LRA when DAT is off
target/s390x: Fix relative long instructions with large offsets
tests/tcg/s390x: Test EPSW
tests/tcg/s390x: Test LARL with a large offset
tests/tcg/s390x: Test LRA
tests/tcg/s390x: Test MDEB and MDEBR
tests/tcg/s390x: Test MVCRL with a large value in R0
tests/tcg/s390x: Fix test-svc with clangPhilippe Mathieu-Daudé (1):
hw/s390x: Move KVM specific PV from hw/ to target/s390x/kvm/
Thomas Huth (6):
tests/qtest/readconfig-test: Allow testing for arbitrary memory sizes tests/qtest: Move mkimg() and have_qemu_img() from libqos to libqtest tests/qtest/readconfig: Test the docs/config/q35-*.cfg files
os-posix: Allow 'chroot' via '-run-with' and deprecate the old '-chroot' option meson.build: Skip C++ detection unless we're targeting Windows docs/devel: Fix coding style in style.rst
MAINTAINERS | 2 -
docs/about/deprecated.rst | 5 +
docs/devel/style.rst | 9 +-
meson.build | 2 +-
target/s390x/helper.h | 2 +-
{include/hw/s390x => target/s390x/kvm}/pv.h | 0
tests/qtest/libqos/libqos.h | 2 -
tests/qtest/libqtest.h | 20 +++
target/s390x/tcg/insn-data.h.inc | 4 +-
hw/s390x/ipl.c | 2 +-
hw/s390x/s390-pci-kvm.c | 2 +-
hw/s390x/s390-virtio-ccw.c | 2 +-
hw/s390x/tod-kvm.c | 2 +-
linux-user/elfload.c | 4 +-
os-posix.c | 35 ++++-
target/s390x/arch_dump.c | 2 +-
target/s390x/cpu-sysemu.c | 2 +-
target/s390x/cpu_features.c | 2 +-
target/s390x/cpu_models.c | 2 +-
target/s390x/diag.c | 2 +-
target/s390x/helper.c | 2 +-
target/s390x/ioinst.c | 2 +-
target/s390x/kvm/kvm.c | 2 +-
{hw/s390x => target/s390x/kvm}/pv.c | 2 +-
target/s390x/mmu_helper.c | 2 +-
target/s390x/tcg/fpu_helper.c | 3 +-
target/s390x/tcg/mem_helper.c | 5 +-
target/s390x/tcg/translate.c | 8 +-
tests/qtest/libqos/libqos.c | 49 +------
tests/qtest/libqtest.c | 52 +++++++
tests/qtest/migration-test.c | 143 ++++++++++++++++---
tests/qtest/readconfig-test.c | 204 +++++++++++++++++++++++++++-
tests/tcg/s390x/epsw.c | 23 ++++
tests/tcg/s390x/larl.c | 21 +++
tests/tcg/s390x/mdeb.c | 30 ++++
tests/tcg/s390x/mie3-mvcrl.c | 46 +++++--
util/async-teardown.c | 21 ---
hw/s390x/meson.build | 1 -
qemu-options.hx | 18 ++-
target/s390x/kvm/meson.build | 1 +
tests/tcg/s390x/Makefile.softmmu-target | 1 +
tests/tcg/s390x/Makefile.target | 3 +
tests/tcg/s390x/gdbstub/test-svc.py | 2 +-
tests/tcg/s390x/hello-s390x-asm.S | 4 +-
tests/tcg/s390x/lra.S | 19 +++
45 files changed, 626 insertions(+), 141 deletions(-)
rename {include/hw/s390x => target/s390x/kvm}/pv.h (100%)
rename {hw/s390x => target/s390x/kvm}/pv.c (99%)
create mode 100644 tests/tcg/s390x/epsw.c
create mode 100644 tests/tcg/s390x/larl.c
create mode 100644 tests/tcg/s390x/mdeb.c
create mode 100644 tests/tcg/s390x/lra.S[PULL v2 13/21] tests/tcg/s390x: Test MVCRL with a large value in R0
From: Ilya Leoshkevich <[email protected]>
Add a small test to prevent regressions.
Message-Id: <[email protected]>
--- tests/tcg/s390x/mie3-mvcrl.c | 46 ++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 10 deletions(-)
tests/tcg/s390x/mie3-mvcrl.c +36 -10
@@ -1,29 +1,55 @@ +#include <stdbool.h> #include <stdint.h> +#include <stdlib.h> #include <string.h> - -static inline void mvcrl_8 (const char *dst,const char *src) +static void mvcrl (const char *dst,const char *src,size_t len) { + register long r0 asm("r0") = len; + asmvolatile ( -"llill %%r0, 8\n" ".insn sse, 0xE50A00000000, 0(%[dst]), 0(%[src])" - : : [dst]"d" (dst), [src]"d" (src) - :"r0" ,"memory" ); + : : [dst]"d" (dst), [src]"d" (src),"r" (r0) + :"memory" ); } - -int main (int argc,char *argv[]) +static bool test (void ) {const char *alpha ="abcdefghijklmnop" ;/* array missing 'i' */ -char tstr[17 ] ="abcdefghjklmnop\0" ; +char tstr[17 ] ="abcdefghjklmnop\0" ;/* mvcrl reference use: 'open a hole in an array' */ -mvcrl_8 (tstr +9 , tstr +8 ); +mvcrl (tstr +9 , tstr +8 ,8 );/* place missing 'i' */ tstr[8 ] ='i' ; -return strncmp (alpha, tstr,16ul ); +return strncmp (alpha, tstr,16ul ) ==0 ; +} + +static bool test_bad_r0 (void ) +{ +char src[256 ] = {0 }; + +/* +* PoP says: Bits 32-55 of general register 0 should contain zeros; +* otherwise, the program may not operate compatibly in the future. +* +* Try it anyway in order to check whether this would crash QEMU itself. +*/ +mvcrl (src, src, (size_t )-1 ); + +return true; +} + +int main (void ) +{ +bool ok = true; + + ok &=test (); + ok &=test_bad_r0 (); + +return ok ?EXIT_SUCCESS :EXIT_FAILURE ; }
Signature · 1 line
2.39.3
Richard Henderson
AppliedQuoted 12 lines · Thomas Huth
Hi Richard!
The following changes since commit
fcb237e64f9d026c03d635579c7b288d0008a6e5:Merge tag 'pull-vfio-20230710' ofhttps://github.com/legoater/qemu into staging (2023-07-10 09:17:06 +0100)are available in the Git repository at:
https://gitlab.com/thuth/qemu.git tags/pull-request-2023-07-10v2for you to fetch changes up to
7233bd122370155abfd75a42c86a9087ca5a8dbf:
Quoted 8 lines
docs/devel: Fix coding style in style.rst (2023-07-10 15:34:57 +0200)----------------------------------------------------------------
* s390x instruction emulation fixes and corresponding TCG tests
* Extend the readconfig qtest
* Introduce "-run-with chroot=..." and deprecate the old "-chroot" option
* Speed up migration tests
* Fix coding style in the coding style document
Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/8.1 as appropriate.
r~