OSDN Git Service

target/s390x: Fix LRA overwriting the top 32 bits on DAT error
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 4 Jul 2023 08:12:29 +0000 (10:12 +0200)
committerThomas Huth <thuth@redhat.com>
Mon, 10 Jul 2023 13:34:24 +0000 (15:34 +0200)
commit6da311a60d58dba27f5f790217d5ebba944e34ab
tree972a0ae0dfd070938c3daa2f6589fe69492d877e
parent92a57534619a4058544ce8f9c0beae3e054f342b
target/s390x: Fix LRA overwriting the top 32 bits on DAT error

When a DAT error occurs, LRA is supposed to write the error information
to the bottom 32 bits of R1, and leave the top 32 bits of R1 alone.

Fix by passing the original value of R1 into helper and copying the
top 32 bits to the return value.

Fixes: d8fe4a9c284f ("target-s390: Convert LRA")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: qemu-stable@nongnu.org
Message-Id: <20230704081506.276055-6-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
target/s390x/helper.h
target/s390x/tcg/mem_helper.c
target/s390x/tcg/translate.c