From patchwork Tue Jun 10 08:08:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 357773 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 10FE0140081 for ; Tue, 10 Jun 2014 18:10:38 +1000 (EST) Received: from localhost ([::1]:37404 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuH8d-0007Rh-RO for incoming@patchwork.ozlabs.org; Tue, 10 Jun 2014 04:10:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuH6s-0004Gx-Qv for qemu-devel@nongnu.org; Tue, 10 Jun 2014 04:08:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuH6j-0008MZ-Ox for qemu-devel@nongnu.org; Tue, 10 Jun 2014 04:08:46 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:56301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuH6j-0008MG-Fh for qemu-devel@nongnu.org; Tue, 10 Jun 2014 04:08:37 -0400 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 10 Jun 2014 09:08:36 +0100 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 10 Jun 2014 09:08:34 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 0A4581B0804B for ; Tue, 10 Jun 2014 09:09:00 +0100 (BST) Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s5A88YEm7602344 for ; Tue, 10 Jun 2014 08:08:34 GMT Received: from d06av08.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s5A88XWi000426 for ; Tue, 10 Jun 2014 02:08:34 -0600 Received: from gondolin.boeblingen.de.ibm.com (dyn-9-152-224-107.boeblingen.de.ibm.com [9.152.224.107]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s5A88SSB032547; Tue, 10 Jun 2014 02:08:33 -0600 From: Cornelia Huck To: qemu-devel@nongnu.org Date: Tue, 10 Jun 2014 10:08:19 +0200 Message-Id: <1402387705-13494-6-git-send-email-cornelia.huck@de.ibm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1402387705-13494-1-git-send-email-cornelia.huck@de.ibm.com> References: <1402387705-13494-1-git-send-email-cornelia.huck@de.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14061008-1948-0000-0000-000000221048 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.75.94.110 Cc: peter.maydell@linaro.org, Thomas Huth , agraf@suse.de, borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, aliguori@amazon.com, Cornelia Huck Subject: [Qemu-devel] [PULL 05/10] s390x/kvm: Log unmanageable program interruptions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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));