[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PULL 39/46] s390x/tcg: wire up SET ADDRESS LIMIT
From: |
Cornelia Huck |
Subject: |
[qemu-s390x] [PULL 39/46] s390x/tcg: wire up SET ADDRESS LIMIT |
Date: |
Thu, 14 Dec 2017 18:09:57 +0100 |
From: David Hildenbrand <address@hidden>
Let's handle it just like KVM:
Depending on the model, this instruction may not be
provided. When this instruction is not provided, it is
checked for operand exception and privileged-opera-
tion exception, and then is suppressed.
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
target/s390x/helper.h | 1 +
target/s390x/insn-data.def | 1 +
target/s390x/misc_helper.c | 9 +++++++++
target/s390x/translate.c | 7 +++++++
4 files changed, 18 insertions(+)
diff --git a/target/s390x/helper.h b/target/s390x/helper.h
index ba11cfdc30..f1acc34f36 100644
--- a/target/s390x/helper.h
+++ b/target/s390x/helper.h
@@ -165,6 +165,7 @@ DEF_HELPER_2(hsch, void, env, i64)
DEF_HELPER_3(msch, void, env, i64, i64)
DEF_HELPER_2(rchp, void, env, i64)
DEF_HELPER_2(rsch, void, env, i64)
+DEF_HELPER_2(sal, void, env, i64)
DEF_HELPER_3(ssch, void, env, i64, i64)
DEF_HELPER_2(stcrw, void, env, i64)
DEF_HELPER_3(stsch, void, env, i64, i64)
diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def
index 6cbd604814..11746f5298 100644
--- a/target/s390x/insn-data.def
+++ b/target/s390x/insn-data.def
@@ -1054,6 +1054,7 @@
C(0xb232, MSCH, S, Z, 0, insn, 0, 0, msch, 0)
C(0xb23b, RCHP, S, Z, 0, 0, 0, 0, rchp, 0)
C(0xb238, RSCH, S, Z, 0, 0, 0, 0, rsch, 0)
+ C(0xb237, SAL, S, Z, 0, 0, 0, 0, sal, 0)
C(0xb233, SSCH, S, Z, 0, insn, 0, 0, ssch, 0)
C(0xb239, STCRW, S, Z, 0, insn, 0, 0, stcrw, 0)
C(0xb234, STSCH, S, Z, 0, insn, 0, 0, stsch, 0)
diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c
index 04fb53d8a3..1941c9c3de 100644
--- a/target/s390x/misc_helper.c
+++ b/target/s390x/misc_helper.c
@@ -377,6 +377,15 @@ void HELPER(rsch)(CPUS390XState *env, uint64_t r1)
qemu_mutex_unlock_iothread();
}
+void HELPER(sal)(CPUS390XState *env, uint64_t r1)
+{
+ S390CPU *cpu = s390_env_get_cpu(env);
+
+ qemu_mutex_lock_iothread();
+ ioinst_handle_sal(cpu, r1, GETPC());
+ qemu_mutex_unlock_iothread();
+}
+
void HELPER(ssch)(CPUS390XState *env, uint64_t r1, uint64_t inst)
{
S390CPU *cpu = s390_env_get_cpu(env);
diff --git a/target/s390x/translate.c b/target/s390x/translate.c
index de00b9471a..30d3d767ea 100644
--- a/target/s390x/translate.c
+++ b/target/s390x/translate.c
@@ -4118,6 +4118,13 @@ static ExitStatus op_rsch(DisasContext *s, DisasOps *o)
return NO_EXIT;
}
+static ExitStatus op_sal(DisasContext *s, DisasOps *o)
+{
+ check_privileged(s);
+ gen_helper_sal(cpu_env, regs[1]);
+ return NO_EXIT;
+}
+
static ExitStatus op_ssch(DisasContext *s, DisasOps *o)
{
check_privileged(s);
--
2.13.6
- [qemu-s390x] [PULL 28/46] s390x/pci: search for subregion inside the BARs, (continued)
- [qemu-s390x] [PULL 28/46] s390x/pci: search for subregion inside the BARs, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 29/46] s390x/css: unrestrict cssids, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 30/46] s390x: deprecate s390-squash-mcss machine prop, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 31/46] s390x/css: attach css bridge, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 32/46] s390x/kvm: factor out build_channel_report_mcic() into cpu.h, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 33/46] s390x/tcg: fix and cleanup mcck injection, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 34/46] s390x/tcg: implement SET CLOCK PROGRAMMABLE FIELD, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 35/46] s390x/tcg: indicate value of TODPR in STCKE, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 36/46] s390x/tcg: wire up STORE CHANNEL REPORT WORD, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 37/46] s390x/tcg: ASI/ASGI/ALSI/ALSGI are atomic with Interlocked-acccess facility 1, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 39/46] s390x/tcg: wire up SET ADDRESS LIMIT,
Cornelia Huck <=
- [qemu-s390x] [PULL 38/46] s390x/tcg: implement Interlocked-Access Facility 2, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 40/46] s390x/tcg: wire up SET CHANNEL MONITOR, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 41/46] s390x/tcg: Implement STORE CHANNEL PATH STATUS, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 42/46] s390x/tcg: Implement SIGNAL ADAPTER instruction, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 44/46] s390x/tcg: we already implement the Set-Program-Parameter facility, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 43/46] s390x/tcg: implement extract-CPU-time facility, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 46/46] s390-ccw-virtio: allow for systems larger that 7.999TB, Cornelia Huck, 2017/12/14
- [qemu-s390x] [PULL 45/46] s390x: change the QEMU cpu model to a stripped down z12, Cornelia Huck, 2017/12/14
- Re: [qemu-s390x] [PULL 00/46] First batch of s390x patches for 2.12, Peter Maydell, 2017/12/14