From nobody Sun Feb 8 22:34:05 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) 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=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) 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 150653184783852.93044163695595; Wed, 27 Sep 2017 10:04:07 -0700 (PDT) Received: from localhost ([::1]:55632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxFkl-0000WN-0M for importer@patchew.org; Wed, 27 Sep 2017 13:04:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxFha-0006fM-J7 for qemu-devel@nongnu.org; Wed, 27 Sep 2017 13:00:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxFhV-00067c-26 for qemu-devel@nongnu.org; Wed, 27 Sep 2017 13:00:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51260) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dxFhU-000675-SW for qemu-devel@nongnu.org; Wed, 27 Sep 2017 13:00:44 -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 B6E301766DA; Wed, 27 Sep 2017 17:00:43 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-241.ams2.redhat.com [10.36.117.241]) by smtp.corp.redhat.com (Postfix) with ESMTP id D63BAE819E; Wed, 27 Sep 2017 17:00:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B6E301766DA Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=david@redhat.com From: David Hildenbrand To: qemu-devel@nongnu.org Date: Wed, 27 Sep 2017 19:00:27 +0200 Message-Id: <20170927170027.8539-4-david@redhat.com> In-Reply-To: <20170927170027.8539-1-david@redhat.com> References: <20170927170027.8539-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.39]); Wed, 27 Sep 2017 17:00:43 +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 RFC 3/3] s390x/tcg: make STFL store into the lowcore 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, Richard Henderson , Alexander Graf , Christian Borntraeger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Using virtual memory access is wrong and will soon include low-address protection checks, which is to be bypassed for STFL. This was originally part of a bigger STFL(E) refactoring. Signed-off-by: David Hildenbrand Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- target/s390x/helper.h | 2 +- target/s390x/misc_helper.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/target/s390x/helper.h b/target/s390x/helper.h index 75ba04fc15..52c2963baa 100644 --- a/target/s390x/helper.h +++ b/target/s390x/helper.h @@ -104,7 +104,6 @@ DEF_HELPER_FLAGS_5(calc_cc, TCG_CALL_NO_RWG_SE, i32, en= v, i32, i64, i64, i64) DEF_HELPER_FLAGS_2(sfpc, TCG_CALL_NO_RWG, void, env, i64) DEF_HELPER_FLAGS_2(sfas, TCG_CALL_NO_WG, void, env, i64) DEF_HELPER_FLAGS_1(popcnt, TCG_CALL_NO_RWG_SE, i64, i64) -DEF_HELPER_FLAGS_1(stfl, TCG_CALL_NO_RWG, void, env) DEF_HELPER_2(stfle, i32, env, i64) DEF_HELPER_FLAGS_2(lpq, TCG_CALL_NO_WG, i64, env, i64) DEF_HELPER_FLAGS_4(stpq, TCG_CALL_NO_WG, void, env, i64, i64, i64) @@ -153,6 +152,7 @@ DEF_HELPER_FLAGS_3(sturg, TCG_CALL_NO_WG, void, env, i6= 4, i64) DEF_HELPER_1(per_check_exception, void, env) DEF_HELPER_FLAGS_3(per_branch, TCG_CALL_NO_RWG, void, env, i64, i64) DEF_HELPER_FLAGS_2(per_ifetch, TCG_CALL_NO_RWG, void, env, i64) +DEF_HELPER_FLAGS_1(stfl, TCG_CALL_NO_RWG, void, env) =20 DEF_HELPER_2(xsch, void, env, i64) DEF_HELPER_2(csch, void, env, i64) diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c index 293fc8428a..0b93381188 100644 --- a/target/s390x/misc_helper.c +++ b/target/s390x/misc_helper.c @@ -541,13 +541,18 @@ static unsigned do_stfle(CPUS390XState *env, uint64_t= words[MAX_STFL_WORDS]) return max_bit / 64; } =20 +#ifndef CONFIG_USER_ONLY void HELPER(stfl)(CPUS390XState *env) { uint64_t words[MAX_STFL_WORDS]; + LowCore *lowcore; =20 + lowcore =3D cpu_map_lowcore(env); do_stfle(env, words); - cpu_stl_data(env, 200, words[0] >> 32); + lowcore->stfl_fac_list =3D cpu_to_be32(words[0] >> 32); + cpu_unmap_lowcore(lowcore); } +#endif =20 uint32_t HELPER(stfle)(CPUS390XState *env, uint64_t addr) { --=20 2.13.5