ASSTHROUGH, and then allow madvise() passthrough for these
pages as well.
Signed-off-by: Ilya Leoshkevich
---
v1: https://lists.gnu.org/archive/html/qemu-devel/2022-07/msg00112.html
v1 -> v2: Fix PAGE_PASSTHROUGH value; make checks consistent with
page_set_flags() (Laurent).
include/exec/c
On Fri, 2022-07-01 at 15:52 +0200, Ilya Leoshkevich wrote:
> This is a follow-up for commit 892a4f6a750a ("linux-user: Add partial
> support for MADV_DONTNEED"), which added passthrough for anonymous
> mappings. File mappings can be handled in a similar manner.
>
> In ord
Add a small test to avoid regressions.
Signed-off-by: Ilya Leoshkevich
---
tests/tcg/s390x/Makefile.softmmu-target | 9 +
tests/tcg/s390x/unaligned-lowcore.S | 19 +++
2 files changed, 28 insertions(+)
create mode 100644 tests/tcg/s390x/Makefile.softmmu-target
.
Signed-off-by: Ilya Leoshkevich
---
include/sysemu/sysemu.h | 2 +-
qapi/run-state.json | 4 +++-
qemu-options.hx | 2 +-
softmmu/main.c | 6 --
softmmu/runstate.c | 17 +
5 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/include
-address-protected lowcore;
it performs a shutdown on success and panic on failure.
Best regards,
Ilya
[1] https://lists.gnu.org/archive/html/qemu-devel/2022-07/msg01876.html
Ilya Leoshkevich (2):
qapi: Add exit-failure PanicAction
tests/tcg/s390x: Test unaligned accesses to lowcore
include
in this case.
Signed-off-by: Ilya Leoshkevich
---
tests/tcg/s390x/Makefile.target | 7 +
tests/tcg/s390x/vfminmax.c | 411
2 files changed, 418 insertions(+)
create mode 100644 tests/tcg/s390x/vfminmax.c
diff --git a/tests/tcg/s390x/Makefile.target b
-devel/2022-07/msg01915.html
v1 -> v2: Drop mmap() in the test (Richard).
Ilya Leoshkevich (3):
target/s390x: fix handling of zeroes in vfmin/vfmax
target/s390x: fix NaN propagation rules
tests/tcg/s390x: test signed vfmin/vfmax
fpu/softfloat-specialize.c.inc| 3 +-
target/s390x/
s390x has the same NaN propagation rules as ARM, and not as x86.
Signed-off-by: Ilya Leoshkevich
Reviewed-by: Richard Henderson
Reviewed-by: David Hildenbrand
---
fpu/softfloat-specialize.c.inc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fpu/softfloat
")
Co-developed-by: Ulrich Weigand
Signed-off-by: Ilya Leoshkevich
Reviewed-by: Richard Henderson
Reviewed-by: David Hildenbrand
---
target/s390x/tcg/vec_fpu_helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/s390x/tcg/vec_fpu_helper.c
b/target
On Wed, 2022-07-13 at 21:14 +0530, Richard Henderson wrote:
> On 7/12/22 18:02, Ilya Leoshkevich wrote:
> > > This works, of course. It could be simpler using EXECUTE, to
> > > store
> > > just the one
> > > instruction and not worry about an executable ma
On Fri, 2022-07-01 at 15:52 +0200, Ilya Leoshkevich wrote:
> This is a follow-up for commit 892a4f6a750a ("linux-user: Add partial
> support for MADV_DONTNEED"), which added passthrough for anonymous
> mappings. File mappings can be handled in a similar manner.
>
> In ord
On Tue, 2022-07-12 at 10:19 +0530, Richard Henderson wrote:
> On 7/12/22 07:27, Ilya Leoshkevich wrote:
> > +/*
> > + * vfmin/vfmax code generation.
> > + */
> > +extern const char vfminmax_template[];
> > +extern const int vfminmax_template_size;
> > +ext
On Tue, 2022-07-12 at 12:08 +0200, David Hildenbrand wrote:
> On 12.07.22 11:52, Ilya Leoshkevich wrote:
> > On Tue, 2022-07-12 at 10:42 +0530, Richard Henderson wrote:
> > > On 7/12/22 00:26, Ilya Leoshkevich wrote:
> > > > System tests on x86 use isa-debug-exit dev
On Tue, 2022-07-12 at 10:42 +0530, Richard Henderson wrote:
> On 7/12/22 00:26, Ilya Leoshkevich wrote:
> > System tests on x86 use isa-debug-exit device in order to signal
> > success or failure to the test runner. Unfortunately it's not
> > easily
> > usable on other a
in this case.
Signed-off-by: Ilya Leoshkevich
---
tests/tcg/s390x/Makefile.target | 7 +
tests/tcg/s390x/vfminmax.c | 426
2 files changed, 433 insertions(+)
create mode 100644 tests/tcg/s390x/vfminmax.c
diff --git a/tests/tcg/s390x/Makefile.target b
s390x has the same NaN propagation rules as ARM, and not as x86.
Signed-off-by: Ilya Leoshkevich
---
fpu/softfloat-specialize.c.inc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fpu/softfloat-specialize.c.inc b/fpu/softfloat-specialize.c.inc
index 943e3301d2..a43ff5e02e
")
Co-developed-by: Ulrich Weigand
Signed-off-by: Ilya Leoshkevich
---
target/s390x/tcg/vec_fpu_helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/s390x/tcg/vec_fpu_helper.c
b/target/s390x/tcg/vec_fpu_helper.c
index 2a618a1093..75cf605b9f 100644
--- a/target
Hi,
Uli has found an issue with finding maximum of different kinds of 0s; I
wrote a test and found another one with finding maximum of different
kinds of NaNs.
Patches 1 and 2 fix those issues, patch 3 adds a vfmin/vfmax test.
Best regards,
Ilya
Ilya Leoshkevich (3):
target/s390x: fix
Add a small test to avoid regressions.
Signed-off-by: Ilya Leoshkevich
---
tests/tcg/s390x/Makefile.softmmu-target | 9 +
tests/tcg/s390x/unaligned-lowcore.S | 24
2 files changed, 33 insertions(+)
create mode 100644 tests/tcg/s390x/Makefile.softmmu-target
Signed-off-by: Ilya Leoshkevich
---
accel/tcg/cputlb.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index f90f4312ea..a46f3a654d 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -2248,7 +2248,7 @@ store_helper_unaligned(CP
a system test for this
issue.
Best regards,
Ilya
Ilya Leoshkevich (3):
accel/tcg: Fix unaligned stores to s390x low-address-protected lowcore
hw/misc: Add mmio-debug-exit device
tests/tcg/s390x: Test unaligned accesses to lowcore
accel/tcg/cputlb.c | 8 ++-
hw/misc
, which an architecture might not
otherwise need.
Introduce mmio-debug-exit device, which has the same semantics, but is
triggered by writes to memory.
Signed-off-by: Ilya Leoshkevich
---
hw/misc/Kconfig | 3 ++
hw/misc/debugexit_mmio.c | 80
hw/misc
On Tue, 2022-07-05 at 15:40 +0100, Peter Maydell wrote:
> On Tue, 5 Jul 2022 at 15:37, Ilya Leoshkevich
> wrote:
> >
> > On Tue, 2022-07-05 at 14:57 +0100, Peter Maydell wrote:
> > > On Tue, 5 Jul 2022 at 14:04, Daniel P. Berrangé
> > >
> > > wrote:
l
[4] http://publibfp.dhe.ibm.com/epubs/pdf/a227832c.pdf
[5] https://lists.gnu.org/archive/html/qemu-devel/2022-07/msg00889.html
Signed-off-by: Ilya Leoshkevich
---
v1: https://lists.gnu.org/archive/html/qemu-devel/2022-03/msg06841.html
v1 -> v2: Rebase, mention Mark Adler's reply in the c
On Tue, 2022-07-05 at 16:27 +0100, Dr. David Alan Gilbert wrote:
> * Ilya Leoshkevich (i...@linux.ibm.com) wrote:
> > zlib_send_prepare() compresses pages of a running VM. zlib does not
> > make any thread-safety guarantees with respect to changing
> > deflate()
> > inpu
On Tue, 2022-07-05 at 14:57 +0100, Peter Maydell wrote:
> On Tue, 5 Jul 2022 at 14:04, Daniel P. Berrangé
> wrote:
> > If we put this job in QEMU CI someone will have to be able to
> > interpret the results when it fails.
>
> In particular since this is qemu-user, the answer is probably
> at
On Tue, 2022-07-05 at 13:58 +0100, Daniel P. Berrangé wrote:
> On Tue, Jul 05, 2022 at 12:48:44AM +0200, Ilya Leoshkevich wrote:
> > wasmtime is a WebAssembly runtime, which includes a large
> > testsuite.
> > This testsuite uses qemu-user (aarch64 and s390x are supported) in
/2022-07/msg00112.html
Signed-off-by: Ilya Leoshkevich
---
.gitlab-ci.d/container-cross.yml | 10 +++
.gitlab-ci.d/container-template.yml | 2 +-
.gitlab-ci.d/qemu-project.yml | 1 +
.gitlab-ci.d/wasmtime-template.yml| 6 ++
.gitlab-ci.d
l
[4] http://publibfp.dhe.ibm.com/epubs/pdf/a227832c.pdf
[5] https://gitlab.com/qemu-project/qemu/-/issues/1099
Signed-off-by: Ilya Leoshkevich
---
v1: https://lists.gnu.org/archive/html/qemu-devel/2022-03/msg06841.html
v1 -> v2: Rebase, mention Mark Adler's reply in the commit message.
migr
ASSTHROUGH, and then allow madvise() passthrough for these
pages as well.
Signed-off-by: Ilya Leoshkevich
---
include/exec/cpu-all.h | 6 ++
linux-user/mmap.c | 25 +
2 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/include/exec/cpu-all.h b/include/exec
of do_syscall(), however, that would change what the
qemu_plugin_register_vcpu_syscall_cb() users get.
Signed-off-by: Ilya Leoshkevich
---
linux-user/mmap.c | 20
linux-user/strace.c| 24
linux-user/syscall.c | 25 +++--
linux
mtime/blob/v0.37.0/ci/qemu-madvise.patch
[4]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/madvise.c?h=v5.19-rc3#n1368
Signed-off-by: Ilya Leoshkevich
Reviewed-by: Laurent Vivier
---
v1: https://lists.gnu.org/archive/html/qemu-devel/2022-06/msg03572.html
v1 -&g
mtime/blob/v0.37.0/ci/qemu-madvise.patch
[4]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/madvise.c?h=v5.19-rc3#n1368
Signed-off-by: Ilya Leoshkevich
---
linux-user/mmap.c | 68 ++
linux-user/syscall.c | 6 +---
linux
On Wed, 2022-05-04 at 00:51 +0200, Ilya Leoshkevich wrote:
> Add a small test to prevent regressions.
>
> Signed-off-by: Ilya Leoshkevich
> ---
> tests/tcg/s390x/signals-s390x.c | 69 ++-
> --
> 1 file changed, 55 insertions(+), 14 deletio
) as writes. There may be
false positives, but they will lead only to an extra page_unprotect()
call.
Reported-by: Thomas Huth
Signed-off-by: Ilya Leoshkevich
---
linux-user/include/host/s390/host-signal.h | 7 +++
1 file changed, 7 insertions(+)
diff --git a/linux-user/include/host/s390/host
On Wed, 2022-05-04 at 12:51 +0200, Ilya Leoshkevich wrote:
> On Wed, 2022-05-04 at 12:46 +0200, Thomas Huth wrote:
> > On 04/05/2022 11.37, Ilya Leoshkevich wrote:
> > > On Wed, 2022-05-04 at 11:14 +0200, Thomas Huth wrote:
> > > > On 04/05/2022 11.07, Ilya Leosh
On Wed, 2022-05-04 at 12:46 +0200, Thomas Huth wrote:
> On 04/05/2022 11.37, Ilya Leoshkevich wrote:
> > On Wed, 2022-05-04 at 11:14 +0200, Thomas Huth wrote:
> > > On 04/05/2022 11.07, Ilya Leoshkevich wrote:
> > > > On Wed, 2022-05-04 at 09:01 +0200, Thomas Huth
On Wed, 2022-05-04 at 11:14 +0200, Thomas Huth wrote:
> On 04/05/2022 11.07, Ilya Leoshkevich wrote:
> > On Wed, 2022-05-04 at 09:01 +0200, Thomas Huth wrote:
> > > On 04/05/2022 00.46, Ilya Leoshkevich wrote:
> > > > On Tue, 2022-05-03 at 21:26 +0200, Thomas Huth
On Wed, 2022-05-04 at 09:01 +0200, Thomas Huth wrote:
> On 04/05/2022 00.46, Ilya Leoshkevich wrote:
> > On Tue, 2022-05-03 at 21:26 +0200, Thomas Huth wrote:
> > > On 03/05/2022 11.02, Thomas Huth wrote:
> > > > On 02/05/2022 18.48, Ilya Leoshkevich wrote:
> >
the field and add a comment.
Reported-by: Ulrich Weigand
Signed-off-by: Ilya Leoshkevich
Fixes: 31330e6cecfd ("linux-user/s390x: Implement setup_sigtramp")
---
linux-user/s390x/signal.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/linux-user/s390x/signal.c b/linux-user/
On Tue, 2022-05-03 at 21:26 +0200, Thomas Huth wrote:
> On 03/05/2022 11.02, Thomas Huth wrote:
> > On 02/05/2022 18.48, Ilya Leoshkevich wrote:
> > > Binutils >=2.37 and Clang do not accept (. - 0x1) PCRel32
> > > constants. While this looks lik
Hi,
This is the fix for the issue discussed in [1].
Patch 1 fixes the issue itself, patch 2 adds a test.
[1] https://lists.nongnu.org/archive/html/qemu-devel/2022-04/msg05127.html
Best regards,
Ilya
Ilya Leoshkevich (2):
linux-user/s390x: Fix unwinding from signal handlers
tests/tcg/s390x
Add a small test to prevent regressions.
Signed-off-by: Ilya Leoshkevich
---
tests/tcg/s390x/signals-s390x.c | 69 ++---
1 file changed, 55 insertions(+), 14 deletions(-)
diff --git a/tests/tcg/s390x/signals-s390x.c b/tests/tcg/s390x/signals-s390x.c
index dc2f8ee59a
Binutils >=2.37 and Clang do not accept (. - 0x1) PCRel32
constants. While this looks like a bug that needs fixing, use a
different notation (-0x1) as a workaround.
Reported-by: Thomas Huth
Signed-off-by: Ilya Leoshkevich
---
tests/tcg/s390x/branch-relative-long.c | 4 ++--
On Mon, 2022-04-04 at 12:20 +0100, Dr. David Alan Gilbert wrote:
> * Ilya Leoshkevich (i...@linux.ibm.com) wrote:
> > zlib_send_prepare() compresses pages of a running VM. zlib does not
> > make any thread-safety guarantees with respect to changing
> > deflate()
> > inpu
chive/html/qemu-devel/2022-03/msg03988.html
[4] http://publibfp.dhe.ibm.com/epubs/pdf/a227832c.pdf
Signed-off-by: Ilya Leoshkevich
---
migration/multifd-zlib.c | 35 ++-
1 file changed, 22 insertions(+), 13 deletions(-)
diff --git a/migration/multifd-zlib.c b/migrati
When RI2 is 0x8000, qemu enters an infinite loop instead of jumping
backwards. Fix by adding a missing cast, like in in2_ri2().
Fixes: 7233f2ed1717 ("target-s390: Convert BRANCH ON CONDITION")
Reviewed-by: David Hildenbrand
Reviewed-by: Richard Henderson
Signed-off-by: Ilya L
Add a small test in order to prevent regressions.
Reviewed-by: Richard Henderson
Reviewed-by: David Hildenbrand
Signed-off-by: Ilya Leoshkevich
---
tests/tcg/s390x/Makefile.target| 1 +
tests/tcg/s390x/branch-relative-long.c | 68 ++
2 files changed, 69
387.html
v2 -> v3:
- Use MAP_NORESERVE (Christian / David).
- Unhardcode 0x10006 (Richard).
Best regards,
Ilya
Ilya Leoshkevich (3):
s390x/tcg: Fix BRASL with a large negative offset
s390x/tcg: Fix BRCL with a large negative offset
tests/tcg/s390x: Test BRASL and BRCL with large ne
When RI2 is 0x8000, qemu enters an infinite loop instead of jumping
backwards. Fix by adding a missing cast, like in in2_ri2().
Fixes: 8ac33cdb8bfb ("Convert BRANCH AND SAVE")
Reviewed-by: David Hildenbrand
Reviewed-by: Richard Henderson
Signed-off-by: Ilya Leoshkevich
---
ta
Add a small test in order to prevent regressions.
Signed-off-by: Ilya Leoshkevich
---
tests/tcg/s390x/Makefile.target| 1 +
tests/tcg/s390x/branch-relative-long.c | 60 ++
2 files changed, 61 insertions(+)
create mode 100644 tests/tcg/s390x/branch-relative
When RI2 is 0x8000, qemu enters an infinite loop instead of jumping
backwards. Fix by adding a missing cast, like in in2_ri2().
Fixes: 8ac33cdb8bfb ("Convert BRANCH AND SAVE")
Reviewed-by: David Hildenbrand
Signed-off-by: Ilya Leoshkevich
---
target/s390x/tcg/translate.c | 2
ard).
- Replace test opcodes with inline asm (David). Since we now want to
skip the test if the code cannot be mapped (e.g. on a 31-bit host),
we shouldn't be asking the loader to map the code right away. So
the mmap() approach stays.
Best regards,
Ilya
Ilya Leoshkevich (3):
s390x/tcg: Fix BR
When RI2 is 0x8000, qemu enters an infinite loop instead of jumping
backwards. Fix by adding a missing cast, like in in2_ri2().
Fixes: 7233f2ed1717 ("target-s390: Convert BRANCH ON CONDITION")
Reviewed-by: David Hildenbrand
Signed-off-by: Ilya Leoshkevich
---
target/s390x/tcg/t
On Fri, 2022-03-11 at 19:57 +0100, David Hildenbrand wrote:
> On 11.03.22 19:49, Ilya Leoshkevich wrote:
> > Add a small test in order to prevent regressions.
> >
> > Signed-off-by: Ilya Leoshkevich
> > ---
> > tests/tcg/s390x/Makefile.target | 1 +
>
When RI2 is 0x8000, qemu enters an infinite loop instead of jumping
backwards. Fix by adding a missing cast, like in in2_ri2().
Fixes: 8ac33cdb8bfb ("Convert BRANCH AND SAVE")
Signed-off-by: Ilya Leoshkevich
---
target/s390x/tcg/translate.c | 2 +-
1 file changed, 1 insertion(+),
When RI2 is 0x8000, qemu enters an infinite loop instead of jumping
backwards. Fix by adding a missing cast, like in in2_ri2().
Fixes: 7233f2ed1717 ("target-s390: Convert BRANCH ON CONDITION")
Signed-off-by: Ilya Leoshkevich
---
target/s390x/tcg/translate.c | 2 +-
1 file
Add a small test in order to prevent regressions.
Signed-off-by: Ilya Leoshkevich
---
tests/tcg/s390x/Makefile.target| 1 +
tests/tcg/s390x/branch-relative-long.c | 29 ++
2 files changed, 30 insertions(+)
create mode 100644 tests/tcg/s390x/branch-relative
Hi,
I noticed that sometimes jumping backwards leads to crashes or hangs.
The problem is a missing cast.
Patches 1 and 2 fix the problem, patch 3 adds a test.
Best regards,
Ilya
Ilya Leoshkevich (3):
s390x/tcg: Fix BRASL with a large negative offset
s390x/tcg: Fix BRCL with a large negative
and sh64 and adapting CC calculation to shift
values greater than 31.
Fixes: cbe24bfa91d2 ("target-s390: Convert SHIFT, ROTATE SINGLE")
Signed-off-by: Ilya Leoshkevich
---
target/s390x/cpu-dump.c| 3 +--
target/s390x/s390x-internal.h | 3 +--
target/s390x/tcg/cc_helpe
SRDA uses r1_D32 for binding the first operand and s64 for setting CC.
cout_s64() relies on o->out being the shift result, however,
wout_r1_D32() clobbers it.
Fix by using a temporary.
Fixes: a79ba3398a0a ("target-s390: Convert SHIFT DOUBLE")
Signed-off-by: Ilya Leoshkevich
---
bit index.
Inline help_l2_shift().
Fix wout_r1_D32().
Add all shift instructions to the test.
Split the series.
Ilya Leoshkevich (5):
target/s390x: Fix SLDA sign bit index
target/s390x: Fix SRDA CC calculation
target/s390x: Fix cc_calc_sla_64() missing
SLDA operates on 64-bit values, so its sign bit index should be 63,
not 31.
Fixes: a79ba3398a0a ("target-s390: Convert SHIFT DOUBLE")
Reported-by: David Hildenbrand
Signed-off-by: Ilya Leoshkevich
Reviewed-by: David Hildenbrand
---
target/s390x/tcg/insn-data.def | 2 +-
1 file
Add a test for each shift instruction in order to to prevent
regressions.
Signed-off-by: Ilya Leoshkevich
---
tests/tcg/s390x/Makefile.target | 1 +
tests/tcg/s390x/shift.c | 270
2 files changed, 271 insertions(+)
create mode 100644 tests/tcg/s390x
INGLE")
Co-developed-by: David Hildenbrand
Signed-off-by: Ilya Leoshkevich
---
target/s390x/tcg/cc_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/s390x/tcg/cc_helper.c b/target/s390x/tcg/cc_helper.c
index c2c96c3a3c..c9b7b0e8c6 100644
--- a/target
On Wed, 2022-01-12 at 16:45 +0100, David Hildenbrand wrote:
> > > If the sign is false, the shifted bits (mask) have to be 0.
> > > If the sign bit is true, the shifted bits (mask) have to be set.
> >
> > IIUC this logic handles sign bit + "shift - 1" bits. So if the last
> > shifted bit is
and sh64 and adapting CC calculation to shift
values greater than 31.
Fixes: cbe24bfa91d2 ("target-s390: Convert SHIFT, ROTATE SINGLE")
Signed-off-by: Ilya Leoshkevich
Reviewed-by: David Hildenbrand
---
target/s390x/cpu-dump.c| 3 +--
target/s390x/s390x-internal.h | 3 +--
ta
SLDA operates on 64-bit values, so its sign bit index should be 63,
not 31.
Fixes: a79ba3398a0a ("target-s390: Convert SHIFT DOUBLE")
Reported-by: David Hildenbrand
Signed-off-by: Ilya Leoshkevich
Reviewed-by: David Hildenbrand
---
target/s390x/tcg/insn-data.def | 2 +-
1 file
INGLE")
Signed-off-by: Ilya Leoshkevich
---
target/s390x/tcg/cc_helper.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/s390x/tcg/cc_helper.c b/target/s390x/tcg/cc_helper.c
index c2c96c3a3c..b6acffa3e8 100644
--- a/target/s390x/tcg/cc_helper.c
+++ b/target
Add a test for each shift instruction in order to to prevent
regressions.
Signed-off-by: Ilya Leoshkevich
---
tests/tcg/s390x/Makefile.target | 1 +
tests/tcg/s390x/shift.c | 270
2 files changed, 271 insertions(+)
create mode 100644 tests/tcg/s390x
SRDA uses r1_D32 for binding the first operand and s64 for setting CC.
cout_s64() relies on o->out being the shift result, however,
wout_r1_D32() clobbers it.
Fix by using a temporary.
Fixes: a79ba3398a0a ("target-s390: Convert SHIFT DOUBLE")
Signed-off-by: Ilya Leoshkevich
Revie
series.
Ilya Leoshkevich (5):
target/s390x: Fix SLDA sign bit index
target/s390x: Fix SRDA CC calculation
target/s390x: Fix cc_calc_sla_64() missing overflows
target/s390x: Fix shifting 32-bit values for more than 31 bits
tests/tcg/s390x: Test shift instructions
target/s390x/cpu-
On Wed, 2022-01-12 at 09:59 +0100, David Hildenbrand wrote:
> On 12.01.22 05:39, Ilya Leoshkevich wrote:
> > An overflow occurs for SLAG when at least one shifted bit is not
> > equal
> > to sign bit. Therefore, we need to check that `shift + 1` bits are
> > neither all
and sh64 and adapting cc_calc_sla_32() to shift
values greater than 31.
Fixes: cbe24bfa91d2 ("target-s390: Convert SHIFT, ROTATE SINGLE")
Signed-off-by: Ilya Leoshkevich
---
target/s390x/tcg/cc_helper.c | 32 +-
target/s390x/tcg/insn-dat
On Tue, 2022-01-11 at 15:22 +0100, David Hildenbrand wrote:
> On 10.01.22 19:59, Ilya Leoshkevich wrote:
> > Both 32- and 64-bit shifts use lowest 6 address bits. The current
> > code
> > special-cases 32-bit shifts to use only 5 bits, which is not
> > correct.
> >
INGLE")
Signed-off-by: Ilya Leoshkevich
---
target/s390x/tcg/cc_helper.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/s390x/tcg/cc_helper.c b/target/s390x/tcg/cc_helper.c
index c2c96c3a3c..b6acffa3e8 100644
--- a/target/s390x/tcg/cc_helper.c
+++ b/target
Add a test for each shift instruction in order to to prevent
regressions.
Signed-off-by: Ilya Leoshkevich
---
tests/tcg/s390x/Makefile.target | 1 +
tests/tcg/s390x/shift.c | 258
2 files changed, 259 insertions(+)
create mode 100644 tests/tcg/s390x
SRDA uses r1_D32 for binding the first operand and s64 for setting CC.
cout_s64() relies on o->out being the shift result, however,
wout_r1_D32() clobbers it.
Fix by using a temporary.
Fixes: a79ba3398a0a ("target-s390: Convert SHIFT DOUBLE")
Signed-off-by: Ilya Leoshkevich
---
est.
Split the series.
Ilya Leoshkevich (5):
target/s390x: Fix SLDA sign bit index
target/s390x: Fix SRDA CC calculation
target/s390x: Fix cc_calc_sla_64() missing overflows
target/s390x: Fix shifting 32-bit values for more than 31 bits
tests/tcg/s390x: Test shift instructions
target/s3
David Hildenbrand noticed that sign bit index for SLDA is wrong: since
SLDA operates on 64-bit values, it should be 63, not 31.
Fixes: a79ba3398a0a ("target-s390: Convert SHIFT DOUBLE")
Signed-off-by: Ilya Leoshkevich
---
target/s390x/tcg/insn-data.def | 2 +-
1 file changed, 1 inser
Both 32- and 64-bit shifts use lowest 6 address bits. The current code
special-cases 32-bit shifts to use only 5 bits, which is not correct.
Fix by merging sh32 and sh64.
Fixes: cbe24bfa91d2 ("target-s390: Convert SHIFT, ROTATE SINGLE")
Signed-off-by: Ilya Leoshkevich
---
target/s390
On Wed, 2021-08-04 at 00:16 +0200, Ilya Leoshkevich wrote:
> x86_64 dotnet/runtime uses cmpxchg for code patching. When running it
> under s390x qemu-linux user, cpu_signal_handler() does not recognize
> this as a write and does not restore PAGE_WRITE cleared by
> tb_page_add(),
On Fri, 2021-08-06 at 07:25 +0200, Thomas Huth wrote:
> On 05/08/2021 00.51, Ilya Leoshkevich wrote:
> > Verify that s390x-specific uc_mcontext.psw.addr is reported
> > correctly
> > and that signal handling interacts properly with debugging.
> >
> >
.
[1] https://lists.nongnu.org/archive/html/qemu-devel/2021-08/msg00644.html
Signed-off-by: Ilya Leoshkevich
---
v2: https://lists.nongnu.org/archive/html/qemu-devel/2021-08/msg00819.html
v2 -> v3: Move translator_ld*_swap() functions from translator.h into
translator.c for a bet
On Thu, 2021-08-05 at 06:59 -1000, Richard Henderson wrote:
> On 8/5/21 12:56 AM, Ilya Leoshkevich wrote:
> > On Wed, 2021-08-04 at 14:30 -1000, Richard Henderson wrote:
> > > I think that the translator_ld*_swap functions should be moved
> > > out of
> > > incl
://lists.nongnu.org/archive/html/qemu-devel/2021-08/msg00644.html
Signed-off-by: Ilya Leoshkevich
---
v1: https://lists.nongnu.org/archive/html/qemu-devel/2021-08/msg00712.html
v1 -> v2: Clear PAGE_WRITE for the initial page and then on each read
that crosses a page boundary (Rich
On Wed, 2021-08-04 at 14:30 -1000, Richard Henderson wrote:
> On 8/4/21 12:46 PM, Ilya Leoshkevich wrote:
> > translate_insn() implementations fetch instruction bytes piecemeal,
> > which can cause qemu-user to generate inconsistent translations if
> > another thread modifies
On Thu, 2021-08-05 at 11:37 +0200, David Hildenbrand wrote:
> On 05.08.21 00:51, Ilya Leoshkevich wrote:
> > Verify that s390x-specific uc_mcontext.psw.addr is reported
> > correctly
> > and that signal handling interacts properly with debugging.
> >
> >
Verify that s390x-specific uc_mcontext.psw.addr is reported correctly
and that signal handling interacts properly with debugging.
Signed-off-by: Ilya Leoshkevich
---
v7: https://lists.nongnu.org/archive/html/qemu-devel/2021-08/msg00463.html
v7 -> v8: Another rebase needed due to the confl
/2021-08/msg00644.html
Signed-off-by: Ilya Leoshkevich
---
accel/tcg/translate-all.c| 59 +---
accel/tcg/translator.c | 26 ++--
include/exec/translate-all.h | 1 +
3 files changed, 59 insertions(+), 27 deletions(-)
diff --git a/accel/tcg
talking about user-only, where translation is
always serial.
stsquad: the link from january is a system-mode bug of the same kind,
where, yes, we need to hold the page lock or something.
rth: ahh yes because we don't have zoned translation caches...
Ilya Leoshkevich (1):
accel/tcg: Clear
Hello,
I'm trying to run a .NET app with qemu-x86_64 on a s390x host. With a
few fixes posted earlier it works for a while and then crashes like
this:
(gdb) x/8i $pc-6
0x3f8ab23ef8:jmpq 0x3f87d2c5e0
0x3f8ab23efd:pop%rdi
=> 0x3f8ab23efe:sub(%rdx),%al
x86_64 dotnet/runtime uses cmpxchg for code patching. When running it
under s390x qemu-linux user, cpu_signal_handler() does not recognize
this as a write and does not restore PAGE_WRITE cleared by
tb_page_add(), incorrectly forwarding the signal to the guest code.
Signed-off-by: Ilya Leoshkevich
x86_64 dotnet/runtime uses cmpxchg for code patching. When running it
under s390x qemu-linux user, cpu_signal_handler() does not recognize
this as a write and does not restore PAGE_WRITE cleared by
tb_page_add(), incorrectly forwarding the signal to the guest code.
Signed-off-by: Ilya Leoshkevich
Verify that s390x-specific uc_mcontext.psw.addr is reported correctly
and that signal handling interacts properly with debugging.
Signed-off-by: Ilya Leoshkevich
---
v6: https://lists.nongnu.org/archive/html/qemu-devel/2021-07/msg00873.html
v6 -> v7: Rebased.
tests/tcg/s390x/Makefile.tar
Core dumps from emulating x86_64 on big-endian hosts contain incorrect
register values.
Signed-off-by: Ilya Leoshkevich
---
linux-user/elfload.c | 88 ++--
1 file changed, 44 insertions(+), 44 deletions(-)
diff --git a/linux-user/elfload.c b/linux-user
setup_rt_frame() passes siginfo and ucontext host addresses to guest
signal handlers, causing problems when e.g. emulating x86_64 on s390x.
Signed-off-by: Ilya Leoshkevich
---
linux-user/i386/signal.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/linux-user/i386
On Tue, 2021-06-01 at 16:20 +0200, Ilya Leoshkevich wrote:
> test_socket hangs randomly in connect(), especially when run without
> qemu. Apparently the reason is that linux started treating backlog
> value of 0 literally instead of rounding it up since v4.4 (commit
> ef547f2ac16b).
On Mon, 2021-07-05 at 23:04 +0200, Ilya Leoshkevich wrote:
> Verify that s390x-specific uc_mcontext.psw.addr is reported correctly
> and that signal handling interacts properly with debugging.
>
> Signed-off-by: Ilya Leoshkevich
> ---
> tests/tcg/s390x/Makefile.target
On Mon, 2021-07-12 at 10:59 -0400, jonathan.albrecht wrote:
> On 2021-07-02 8:01 am, Laurent Vivier wrote:
> > Le 02/07/2021 à 12:34, Cornelia Huck a écrit :
> > > On Wed, Jun 23 2021, Ilya Leoshkevich wrote:
> > >
> > >
> > > What's the st
801 - 900 of 967 matches
Mail list logo