Received: from eggs.gnu.org ([2001:4830:134:3::10]:57529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrpO9-0001nR-Gk for qemu-devel@nongnu.org; Tue, 03 Jun 2014 10:08:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WrpNz-0008M3-Sq for qemu-devel@nongnu.org; Tue, 03 Jun 2014 10:08:29 -0400 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:41489) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrpNz-0008Lp-Jc for qemu-devel@nongnu.org; Tue, 03 Jun 2014 10:08:19 -0400 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 3 Jun 2014 15:08:18 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 68791219005E for ; Tue, 3 Jun 2014 15:08:06 +0100 (BST) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s53E8GdW20250840 for ; Tue, 3 Jun 2014 14:08:16 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s53E8GDJ022995 for ; Tue, 3 Jun 2014 08:08:16 -0600 From: Cornelia Huck Date: Tue, 3 Jun 2014 16:08:00 +0200 Message-Id: <1401804485-14801-6-git-send-email-cornelia.huck@de.ibm.com> In-Reply-To: <1401804485-14801-1-git-send-email-cornelia.huck@de.ibm.com> References: <1401804485-14801-1-git-send-email-cornelia.huck@de.ibm.com> Subject: [Qemu-devel] [PATCH 05/10] s390x/kvm: Log unmanageable program interruptions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Cornelia Huck , borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, agraf@suse.de, Thomas Huth From: Thomas Huth The kernel only drops to userspace if an endless program interrupt loop has been detected. Let's print an error message in this case to inform the user about the crash and stop the affected CPU with a panic event, just like it is already done for the external interruption loop detection. Signed-off-by: Thomas Huth Signed-off-by: Jens Freimann Reviewed-by: Cornelia Huck Signed-off-by: Cornelia Huck --- target-s390x/kvm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index be703bd..9adda1b 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -83,6 +83,7 @@ #define DIAG_KVM_BREAKPOINT 0x501 #define ICPT_INSTRUCTION 0x04 +#define ICPT_PROGRAM 0x08 #define ICPT_EXT_INT 0x14 #define ICPT_WAITPSW 0x1c #define ICPT_SOFT_INTERCEPT 0x24 @@ -966,6 +967,11 @@ static int handle_intercept(S390CPU *cpu) case ICPT_INSTRUCTION: r = handle_instruction(cpu, run); break; + case ICPT_PROGRAM: + unmanageable_intercept(cpu, "program interrupt", + offsetof(LowCore, program_new_psw)); + r = EXCP_HALTED; + break; case ICPT_EXT_INT: unmanageable_intercept(cpu, "external interrupt", offsetof(LowCore, external_new_psw)); -- 1.7.9.5