From nobody Sat Apr 27 15:16:04 2024 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.zoho.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 1488185690675427.56299581356984; Mon, 27 Feb 2017 00:54:50 -0800 (PST) Received: from localhost ([::1]:51085 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciH4z-0008L6-Ke for importer@patchew.org; Mon, 27 Feb 2017 03:54:49 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciH4D-000834-Ng for qemu-devel@nongnu.org; Mon, 27 Feb 2017 03:54:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciH4A-0001Xd-Mf for qemu-devel@nongnu.org; Mon, 27 Feb 2017 03:54:01 -0500 Received: from mx2.suse.de ([195.135.220.15]:57338) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ciH4A-0001XP-Gm for qemu-devel@nongnu.org; Mon, 27 Feb 2017 03:53:58 -0500 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6B3E3AABE; Mon, 27 Feb 2017 08:53:57 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Miroslav Benes To: rth@twiddle.net, agraf@suse.de Date: Mon, 27 Feb 2017 09:53:53 +0100 Message-Id: <20170227085353.20787-1-mbenes@suse.cz> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: [Qemu-devel] [PATCH v2] target-s390x: Implement lpp instruction 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, ebischoff@suse.com, mmarek@suse.com, Miroslav Benes , qemu-devel@nongnu.org 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" Linux arch/s390/kernel/head(64).S uses lpp instruction if it is available in facilities list provided by stfl/stfle instruction. This is the case of newer z/System generations and their qemu definition. Signed-off-by: Miroslav Benes Reviewed-by: Richard Henderson --- v2 - remove potential_page_fault() target/s390x/insn-data.def | 2 ++ target/s390x/translate.c | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def index 075ff597c3de..880b0403cb5e 100644 --- a/target/s390x/insn-data.def +++ b/target/s390x/insn-data.def @@ -843,6 +843,8 @@ /* LOAD CONTROL */ C(0xb700, LCTL, RS_a, Z, 0, a2, 0, 0, lctl, 0) C(0xeb2f, LCTLG, RSY_a, Z, 0, a2, 0, 0, lctlg, 0) +/* LOAD PROGRAM PARAMETER */ + C(0xb280, LPP, S, LPP, 0, m2_64, 0, 0, lpp, 0) /* LOAD PSW */ C(0x8200, LPSW, S, Z, 0, a2, 0, 0, lpsw, 0) /* LOAD PSW EXTENDED */ diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 01c62176bf70..3032d495dcf8 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -1194,6 +1194,7 @@ typedef enum DisasFacility { FAC_SCF, /* store clock fast */ FAC_SFLE, /* store facility list extended */ FAC_ILA, /* interlocked access facility 1 */ + FAC_LPP, /* load-program-parameter */ } DisasFacility; =20 struct DisasInsn { @@ -2567,6 +2568,14 @@ static ExitStatus op_lra(DisasContext *s, DisasOps *= o) return NO_EXIT; } =20 +static ExitStatus op_lpp(DisasContext *s, DisasOps *o) +{ + check_privileged(s); + + tcg_gen_st_i64(o->in2, cpu_env, offsetof(CPUS390XState, pp)); + return NO_EXIT; +} + static ExitStatus op_lpsw(DisasContext *s, DisasOps *o) { TCGv_i64 t1, t2; --=20 2.11.0