OSDN Git Service

target/s390x: Fix LRA when DAT is off
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 4 Jul 2023 08:12:30 +0000 (10:12 +0200)
committerThomas Huth <thuth@redhat.com>
Mon, 10 Jul 2023 13:34:24 +0000 (15:34 +0200)
LRA should perform DAT regardless of whether it's on or off.
Disable DAT check for MMU_S390_LRA.

Fixes: defb0e3157af ("s390x: Implement opcode helpers")
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-7-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
target/s390x/mmu_helper.c

index b04b57c..fbb2f1b 100644 (file)
@@ -417,7 +417,7 @@ int mmu_translate(CPUS390XState *env, target_ulong vaddr, int rw, uint64_t asc,
 
     vaddr &= TARGET_PAGE_MASK;
 
-    if (!(env->psw.mask & PSW_MASK_DAT)) {
+    if (rw != MMU_S390_LRA && !(env->psw.mask & PSW_MASK_DAT)) {
         *raddr = vaddr;
         goto nodat;
     }