public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Janosch Frank <frankja@linux.ibm.com>
To: pbonzini@redhat.com
Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, david@redhat.com,
	borntraeger@de.ibm.com, cohuck@redhat.com,
	linux-s390@vger.kernel.org, imbrenda@linux.ibm.com,
	thuth@redhat.com
Subject: [kvm-unit-tests GIT PULL 7/8] lib: s390x: Print if a pgm happened while in SIE
Date: Wed,  7 Jul 2021 16:03:17 +0200	[thread overview]
Message-ID: <20210707140318.44255-8-frankja@linux.ibm.com> (raw)
In-Reply-To: <20210707140318.44255-1-frankja@linux.ibm.com>

For debugging it helps if you know if the PGM happened while being in
SIE or not.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
---
 lib/s390x/interrupt.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib/s390x/interrupt.c b/lib/s390x/interrupt.c
index b627942f..109f2907 100644
--- a/lib/s390x/interrupt.c
+++ b/lib/s390x/interrupt.c
@@ -141,10 +141,15 @@ static void print_int_regs(struct stack_frame_int *stack)
 static void print_pgm_info(struct stack_frame_int *stack)
 
 {
+	bool in_sie;
+
+	in_sie = (lc->pgm_old_psw.addr >= (uintptr_t)sie_entry &&
+		  lc->pgm_old_psw.addr <= (uintptr_t)sie_exit);
+
 	printf("\n");
-	printf("Unexpected program interrupt: %d on cpu %d at %#lx, ilen %d\n",
-	       lc->pgm_int_code, stap(), lc->pgm_old_psw.addr,
-	       lc->pgm_int_id);
+	printf("Unexpected program interrupt %s: %d on cpu %d at %#lx, ilen %d\n",
+	       in_sie ? "in SIE" : "",
+	       lc->pgm_int_code, stap(), lc->pgm_old_psw.addr, lc->pgm_int_id);
 	print_int_regs(stack);
 	dump_stack();
 	report_summary();
-- 
2.31.1


  parent reply	other threads:[~2021-07-07 14:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07 14:03 [kvm-unit-tests GIT PULL 0/8] s390x update 2021-07-07 Janosch Frank
2021-07-07 14:03 ` [kvm-unit-tests GIT PULL 1/8] s390x: snippets: Add gitignore as well as linker script and start assembly Janosch Frank
2021-07-07 14:03 ` [kvm-unit-tests GIT PULL 2/8] s390x: snippets: Add snippet compilation Janosch Frank
2021-07-07 14:03 ` [kvm-unit-tests GIT PULL 3/8] s390x: mvpg: Add SIE mvpg test Janosch Frank
2021-07-07 14:03 ` [kvm-unit-tests GIT PULL 4/8] s390x: sie: Add missing includes Janosch Frank
2021-07-07 14:03 ` [kvm-unit-tests GIT PULL 5/8] s390x: sie: Fix sie.h integer types Janosch Frank
2021-07-07 14:03 ` [kvm-unit-tests GIT PULL 6/8] lib: s390x: uv: Add offset comments to uv_query and extend it Janosch Frank
2021-07-07 14:03 ` Janosch Frank [this message]
2021-07-07 14:03 ` [kvm-unit-tests GIT PULL 8/8] lib: s390x: Remove left behing PGM report Janosch Frank
2021-07-07 17:33 ` [kvm-unit-tests GIT PULL 0/8] s390x update 2021-07-07 Paolo Bonzini

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=20210707140318.44255-8-frankja@linux.ibm.com \
    --to=frankja@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --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