From: Cornelia Huck <cohuck@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
qemu-s390x@nongnu.org,
Richard Henderson <richard.henderson@linaro.org>,
qemu-devel@nongnu.org
Subject: Re: [PATCH v2] s390x/tcg: Implement MONITOR CALL
Date: Mon, 21 Sep 2020 15:06:56 +0200 [thread overview]
Message-ID: <20200921150656.0f2fcb81.cohuck@redhat.com> (raw)
In-Reply-To: <20200918085122.26132-1-david@redhat.com>
On Fri, 18 Sep 2020 10:51:22 +0200
David Hildenbrand <david@redhat.com> wrote:
> Recent upstream Linux uses the MONITOR CALL instruction for things like
> BUG_ON() and WARN_ON(). We currently inject an operation exception when
> we hit a MONITOR CALL instruction - which is wrong, as the instruction
> is not glued to specific CPU features.
>
> Doing a simple WARN_ON_ONCE() currently results in a panic:
> [ 18.162801] illegal operation: 0001 ilc:2 [#1] SMP
> [ 18.162889] Modules linked in:
> [...]
> [ 18.165476] Kernel panic - not syncing: Fatal exception: panic_on_oops
>
> With a proper implementation, we now get:
> [ 18.242754] ------------[ cut here ]------------
> [ 18.242855] WARNING: CPU: 7 PID: 1 at init/main.c:1534 [...]
> [ 18.242919] Modules linked in:
> [...]
> [ 18.246262] ---[ end trace a420477d71dc97b4 ]---
> [ 18.259014] Freeing unused kernel memory: 4220K
>
> Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>
> v1 -> v2:
> - Simplify by not using the tb flags, always calling the helper.
>
> I looked into monitor-event counting, which looks easy at first glance
> - but proper DAT/access exception handling is tricky. Leaving that for
> a cold winter evening :)
Fortunately, this is covered by a facility bit, so no need to do this
now :)
>
> ---
> target/s390x/excp_helper.c | 23 +++++++++++++++++++++++
> target/s390x/helper.h | 1 +
> target/s390x/insn-data.def | 3 +++
> target/s390x/translate.c | 21 +++++++++++++++++++++
> 4 files changed, 48 insertions(+)
Thanks, applied.
prev parent reply other threads:[~2020-09-21 13:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-18 8:51 [PATCH v2] s390x/tcg: Implement MONITOR CALL David Hildenbrand
2020-09-18 15:54 ` Richard Henderson
2020-09-21 13:06 ` Cornelia Huck [this message]
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=20200921150656.0f2fcb81.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--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).