[{"id":1790086,"web_url":"http://patchwork.ozlabs.org/comment/1790086/","msgid":"<20171019034425.GA3492@fergus.ozlabs.ibm.com>","list_archive_url":null,"date":"2017-10-19T03:44:25","subject":"Re: [PATCH] KVM: PPC: Book3S HV: Handle unexpected interrupts better","submitter":{"id":67079,"url":"http://patchwork.ozlabs.org/api/people/67079/","name":"Paul Mackerras","email":"paulus@ozlabs.org"},"content":"On Fri, Sep 01, 2017 at 04:19:13PM +1000, Paul Mackerras wrote:\n> At present, if an interrupt (i.e. an exception or trap) occurs in the\n> code where KVM is switching the MMU to or from guest context, we jump\n> to kvmppc_bad_host_intr, where we simply spin with interrupts disabled.\n> In this situation, it is hard to debug what happened because we get no\n> indication as to which interrupt occurred or where.  Typically we get\n> a cascade of stall and soft lockup warnings from other CPUs.\n> \n> In order to get more information for debugging, this adds code to\n> create a stack frame on the emergency stack and save register values\n> to it.  We start half-way down the emergency stack in order to give\n> ourselves some chance of being able to do a stack trace on secondary\n> threads that are already on the emergency stack.\n> \n> On POWER7 or POWER8, we then just spin, as before, because we don't\n> know what state the MMU context is in or what other threads are doing,\n> and we can't switch back to host context without coordinating with\n> other threads.  On POWER9 we can do better; there we load up the host\n> MMU context and jump to C code, which prints an oops message to the\n> console and panics.\n> \n> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>\n\nApplied to my kvm-ppc-next branch.\n\nPaul.\n--\nTo unsubscribe from this list: send the line \"unsubscribe kvm-ppc\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<kvm-ppc-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=kvm-ppc-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tsecure) header.d=ozlabs.org header.i=@ozlabs.org header.b=\"CFq9Fxka\";\n\tdkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yHZj72ckTz9tXF\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 19 Oct 2017 14:51:07 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751742AbdJSDut (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tWed, 18 Oct 2017 23:50:49 -0400","from ozlabs.org ([103.22.144.67]:39301 \"EHLO ozlabs.org\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1751740AbdJSDtQ (ORCPT <rfc822;kvm-ppc@vger.kernel.org>);\n\tWed, 18 Oct 2017 23:49:16 -0400","by ozlabs.org (Postfix, from userid 1003)\n\tid 3yHZfz0gr6z9tXC; Thu, 19 Oct 2017 14:49:14 +1100 (AEDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; \n\tt=1508384955; bh=Tp8mZMeKWPOaIMEdf9WKYuI+T1GmLnmLNuMlCFkKyzY=;\n\th=Date:From:To:Subject:References:In-Reply-To:From;\n\tb=CFq9Fxka8n1+D1oCYxdJKLeQrfU141Niap2U2DkaWGsjbOdj/xvnvp1p7ryAFx6Iq\n\tIi+TXj+UxfdhPHnf2nP6PymACLGAsT17AdeYo5nSUxtixktEj3+jNI7jLu62fdiJmQ\n\tSmaHwz4aC33ofWJl9Il2EBR3JB79mUGrlOUVKQkgSOmmAoaFnMCk6PC9fH/gjSfmCU\n\tQ0FRqtM3Fhwr6x4EiGIugg79QqxVWZ8WmM50JrBatUjrzBa5nH3OkoIeuOD/QZTcZt\n\tluAlcP4BsuEOCA3fN2QT7ysGXVEfrDxlHUxHK9k69IuBTXhAFd2olU65WMLwA5qMpX\n\ti/dPgsbpI4wTw==","Date":"Thu, 19 Oct 2017 14:44:25 +1100","From":"Paul Mackerras <paulus@ozlabs.org>","To":"kvm-ppc@vger.kernel.org, kvm@vger.kernel.org","Subject":"Re: [PATCH] KVM: PPC: Book3S HV: Handle unexpected interrupts better","Message-ID":"<20171019034425.GA3492@fergus.ozlabs.ibm.com>","References":"<20170901061913.GB5644@fergus.ozlabs.ibm.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170901061913.GB5644@fergus.ozlabs.ibm.com>","User-Agent":"Mutt/1.5.24 (2015-08-30)","Sender":"kvm-ppc-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<kvm-ppc.vger.kernel.org>","X-Mailing-List":"kvm-ppc@vger.kernel.org"}}]