From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d89Xg-00015F-UD for qemu-devel@nongnu.org; Tue, 09 May 2017 14:07:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d89Xf-0002hZ-PT for qemu-devel@nongnu.org; Tue, 09 May 2017 14:07:24 -0400 Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]:32860) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d89Xf-0002h0-LT for qemu-devel@nongnu.org; Tue, 09 May 2017 14:07:23 -0400 Received: by mail-qt0-x241.google.com with SMTP id a46so1002074qte.0 for ; Tue, 09 May 2017 11:07:23 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Tue, 9 May 2017 11:07:11 -0700 Message-Id: <20170509180715.22910-3-rth@twiddle.net> In-Reply-To: <20170509180715.22910-1-rth@twiddle.net> References: <20170509180715.22910-1-rth@twiddle.net> Subject: [Qemu-devel] [PATCH v3 2/6] target/s390x: Implement LOAD PROGRAM PARAMETER List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Miroslav Benes From: Miroslav Benes 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. The description of LPP is at http://www-01.ibm.com/support/docview.wss?uid=isg26fcd1cc32246f4c8852574ce0044734a Reviewed-by: Aurelien Jarno Signed-off-by: Miroslav Benes Message-Id: <20170227085353.20787-1-mbenes@suse.cz> Signed-off-by: Richard Henderson --- 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 b6702da..43c5707 100644 --- a/target/s390x/insn-data.def +++ b/target/s390x/insn-data.def @@ -845,6 +845,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 69940e3..2b66a4e 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; struct DisasInsn { @@ -2567,6 +2568,14 @@ static ExitStatus op_lra(DisasContext *s, DisasOps *o) return NO_EXIT; } +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; -- 2.9.3