From: David Hildenbrand <david@redhat.com>
To: qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
Cornelia Huck <cohuck@redhat.com>,
Richard Henderson <rth@twiddle.net>,
Alexander Graf <agraf@suse.de>, Thomas Huth <thuth@redhat.com>,
David Hildenbrand <david@redhat.com>
Subject: [Qemu-devel] [PATCH v1 for-2.12 6/9] s390x/tcg: Implement SIGA instruction
Date: Mon, 4 Dec 2017 15:01:47 +0100 [thread overview]
Message-ID: <20171204140150.20483-7-david@redhat.com> (raw)
In-Reply-To: <20171204140150.20483-1-david@redhat.com>
I have no idea what that instruction does, but KVM seems to suppress it,
setting cc=3 (and as it seems to be an io instruction, it should be
protected). Let's do the same for TCG, so we're at least equal.
(it is used in the kernel for qdio, I wasn't even able to find the real
name of that instruction)
Signed-off-by: David Hildenbrand <david@redhat.com>
---
target/s390x/insn-data.def | 1 +
target/s390x/translate.c | 8 ++++++++
2 files changed, 9 insertions(+)
diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def
index c7353e7f11..f7b66b0091 100644
--- a/target/s390x/insn-data.def
+++ b/target/s390x/insn-data.def
@@ -1056,6 +1056,7 @@
C(0xb238, RSCH, S, Z, 0, 0, 0, 0, rsch, 0)
C(0xb237, SAL, S, Z, 0, 0, 0, 0, sal, 0)
C(0xb23c, SCHM, S, Z, 0, insn, 0, 0, schm, 0)
+ C(0xb274, SIGA, S, Z, 0, 0, 0, 0, siga, 0)
C(0xb23a, STCPS, S, Z, 0, 0, 0, 0, stcps, 0)
C(0xb233, SSCH, S, Z, 0, insn, 0, 0, ssch, 0)
C(0xb239, STCRW, S, Z, 0, insn, 0, 0, stcrw, 0)
diff --git a/target/s390x/translate.c b/target/s390x/translate.c
index 5c2432678c..1e4079464a 100644
--- a/target/s390x/translate.c
+++ b/target/s390x/translate.c
@@ -4102,6 +4102,14 @@ static ExitStatus op_schm(DisasContext *s, DisasOps *o)
return NO_EXIT;
}
+static ExitStatus op_siga(DisasContext *s, DisasOps *o)
+{
+ check_privileged(s);
+ /* From KVM code: Not provided, set CC = 3 for subchannel not operational */
+ gen_op_movi_cc(s, 3);
+ return NO_EXIT;
+}
+
static ExitStatus op_stcps(DisasContext *s, DisasOps *o)
{
check_privileged(s);
--
2.14.3
next prev parent reply other threads:[~2017-12-04 14:02 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-04 14:01 [Qemu-devel] [PATCH v1 for-2.12 0/9] s390x/tcg: facilitites and instructions David Hildenbrand
2017-12-04 14:01 ` [Qemu-devel] [PATCH v1 for-2.12 1/9] s390x/tcg: ALSI/ALSGI are atomic with interlocked-acccess facility 1 David Hildenbrand
2017-12-04 14:01 ` [Qemu-devel] [PATCH v1 for-2.12 2/9] s390x/tcg: implement Interlocked-Access Facility 2 David Hildenbrand
2017-12-04 14:01 ` [Qemu-devel] [PATCH v1 for-2.12 3/9] s390x/tcg: wire up SET ADDRESS LIMIT David Hildenbrand
2017-12-05 14:56 ` Cornelia Huck
2017-12-05 16:24 ` David Hildenbrand
2017-12-04 14:01 ` [Qemu-devel] [PATCH v1 for-2.12 4/9] s390x/tcg: wire up SET CHANNEL MONITOR David Hildenbrand
2017-12-04 17:24 ` Cornelia Huck
2017-12-04 17:27 ` David Hildenbrand
2017-12-04 17:32 ` Cornelia Huck
2017-12-04 17:39 ` David Hildenbrand
2017-12-04 14:01 ` [Qemu-devel] [PATCH v1 for-2.12 5/9] s390x/tcg: Implement STORE CHANNEL PATH STATUS David Hildenbrand
2017-12-05 15:04 ` Cornelia Huck
2017-12-04 14:01 ` David Hildenbrand [this message]
2017-12-04 17:29 ` [Qemu-devel] [PATCH v1 for-2.12 6/9] s390x/tcg: Implement SIGA instruction Cornelia Huck
2017-12-04 14:01 ` [Qemu-devel] [PATCH v1 for-2.12 7/9] s390x/tcg: implement extract-CPU-time facility David Hildenbrand
2017-12-05 15:14 ` Cornelia Huck
2017-12-05 16:28 ` David Hildenbrand
2017-12-04 14:01 ` [Qemu-devel] [PATCH v1 for-2.12 8/9] s390x/tcg: we already implement the Set-Program-Parameter facility David Hildenbrand
2017-12-05 15:17 ` Cornelia Huck
2017-12-04 14:01 ` [Qemu-devel] [PATCH v1 for-2.12 9/9] s390x: change the QEMU cpu model to a stripped down z12 David Hildenbrand
2017-12-05 15:24 ` Cornelia Huck
2017-12-05 16:34 ` David Hildenbrand
2017-12-04 14:05 ` [Qemu-devel] [PATCH v1 for-2.12 01/10] s390x/tcg: ASI/ASGI are atomic with interlocked-acccess facility 1 David Hildenbrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171204140150.20483-7-david@redhat.com \
--to=david@redhat.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).