From nobody Mon Feb 9 20:59:03 2026 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1506451128490438.9170807175208; Tue, 26 Sep 2017 11:38:48 -0700 (PDT) Received: from localhost ([::1]:50690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwuke-000846-V7 for importer@patchew.org; Tue, 26 Sep 2017 14:38:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwufq-0004Uf-7c for qemu-devel@nongnu.org; Tue, 26 Sep 2017 14:33:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwufp-0003V0-Fv for qemu-devel@nongnu.org; Tue, 26 Sep 2017 14:33:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42424) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dwufp-0003Ul-AO for qemu-devel@nongnu.org; Tue, 26 Sep 2017 14:33:37 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5C30D81DFC; Tue, 26 Sep 2017 18:33:36 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-152.ams2.redhat.com [10.36.117.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9A6D360841; Tue, 26 Sep 2017 18:33:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5C30D81DFC Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=david@redhat.com From: David Hildenbrand To: qemu-devel@nongnu.org Date: Tue, 26 Sep 2017 20:33:17 +0200 Message-Id: <20170926183318.12995-6-david@redhat.com> In-Reply-To: <20170926183318.12995-1-david@redhat.com> References: <20170926183318.12995-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 26 Sep 2017 18:33:36 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v1 5/6] s390x/tcg: make testblock use the new _real mmu X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, David Hildenbrand , cohuck@redhat.com, Alexander Graf , Christian Borntraeger , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_6 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Low address protection checks will be moved into the mmu later. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 34ffc282bf..4cf4f29171 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/mem_helper.c @@ -1702,17 +1702,9 @@ uint32_t HELPER(testblock)(CPUS390XState *env, uint6= 4_t real_addr) { uintptr_t ra =3D GETPC(); CPUState *cs =3D CPU(s390_env_get_cpu(env)); - uint64_t abs_addr; int i; =20 - real_addr =3D wrap_address(env, real_addr); - abs_addr =3D mmu_real2abs(env, real_addr) & TARGET_PAGE_MASK; - if (!address_space_access_valid(&address_space_memory, abs_addr, - TARGET_PAGE_SIZE, true)) { - cpu_restore_state(cs, ra); - program_interrupt(env, PGM_ADDRESSING, 4); - return 1; - } + real_addr =3D wrap_address(env, real_addr) & TARGET_PAGE_MASK; =20 /* Check low-address protection */ if ((env->cregs[0] & CR0_LOWPROT) && real_addr < 0x2000) { @@ -1722,7 +1714,7 @@ uint32_t HELPER(testblock)(CPUS390XState *env, uint64= _t real_addr) } =20 for (i =3D 0; i < TARGET_PAGE_SIZE; i +=3D 8) { - stq_phys(cs->as, abs_addr + i, 0); + cpu_stq_real_ra(env, real_addr + i, 0, ra); } =20 return 0; --=20 2.13.5