From patchwork Wed Mar 25 14:41:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1261425 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=F3s7I/IW; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48nW7d17QTz9sP7 for ; Thu, 26 Mar 2020 01:43:09 +1100 (AEDT) Received: from localhost ([::1]:37324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jH7FL-0003f7-3T for incoming@patchwork.ozlabs.org; Wed, 25 Mar 2020 10:43:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36978) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jH7Et-0003bx-CZ for qemu-devel@nongnu.org; Wed, 25 Mar 2020 10:42:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jH7Es-0005SZ-Ac for qemu-devel@nongnu.org; Wed, 25 Mar 2020 10:42:39 -0400 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:34798) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jH7Ep-0005Pt-UY; Wed, 25 Mar 2020 10:42:36 -0400 Received: by mail-pj1-x1044.google.com with SMTP id q16so2344069pje.1; Wed, 25 Mar 2020 07:42:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ybJNhwTs4hcuyCloEUZpI15gh8XakkuQg56/8GwxtK0=; b=F3s7I/IWN/gJMoGrqgg6JVZsfJFoyzvEh7q9j8haqxvpTwcf1h+aBoKmMAddVyCWK9 aLMPKNrjA2LRqpeGeqpGqXL4gm582uKKji5dB01akLtm63kY+1brgoIPsQOAS1IJGTso oeRO8NoeUyl6gFz9uTzXuqpRgvujxz1QDLVwq71bybuOjmj8xsJFN2LZIXCUs//YyeDB JmOTGnM0N17LAZEoJPMBohCC/kcihuHiQFUHHu1JvNrgZuQD8Kt4noFpX0SU0wqWUl3m Deq4JEvfAH6lD6ixM0sE3xVNHBhyw27/54yVPe22QqQuLWGrL0z7FA6PWhFYAnf7cxAw xcZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ybJNhwTs4hcuyCloEUZpI15gh8XakkuQg56/8GwxtK0=; b=kLWv95VzPCxHLjhY1FnmY8h4z7v0NuQLiHpJCRtaMr2SPjScLn0jVaRbGawTmvpEDe yRKclYKV4AshslFO3MxzKqYoKRhp5zxc1Cbz7K6gjlhcxsIzn2obezvRrdGHA4ag4EGh Heu9cfvmNmxV0EnWhujjyrLviIjmwh5au4ujU9h7C/cBh70GlOPkIEzu9s3ytnFYHiRS hJOJSUzRzagkqry2b5EwwKRvtAkH1gb+zqQjgOWE643qUMqysSEa6rNWSrXj4Nf9UXZa F9TWgNEus0udX4hUXwpaSB76VzQVs/zcE4Itlz7uSWWhC1wILNI5GVi7xGV/3OKaMEq8 o7Qg== X-Gm-Message-State: ANhLgQ0rD1sSNhy+lrr39JLNNXqSlDX9OCLQziYTyJFIWqKhkg8tCFgU whLoJENCSXBgTeLTfLYm4CtXMyQZ X-Google-Smtp-Source: ADFU+vvOlle3eizRMEAorKEFAfeYcuag56glbUMbMerk7FJsG5ykbckc5fF/+xDPbkfbMeqZPpJN7g== X-Received: by 2002:a17:90a:c790:: with SMTP id gn16mr4147840pjb.146.1585147354485; Wed, 25 Mar 2020 07:42:34 -0700 (PDT) Received: from bobo.ibm.com (14-202-190-183.tpgi.com.au. [14.202.190.183]) by smtp.gmail.com with ESMTPSA id 93sm4609599pjo.43.2020.03.25.07.42.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2020 07:42:33 -0700 (PDT) From: Nicholas Piggin To: qemu-ppc@nongnu.org Subject: [PATCH 0/5] ppc: sreset and machine check injection Date: Thu, 26 Mar 2020 00:41:42 +1000 Message-Id: <20200325144147.221875-1-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::1044 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexey Kardashevskiy , Mahesh Salgaonkar , qemu-devel@nongnu.org, Nicholas Piggin , Greg Kurz , =?utf-8?b?Q8OpZHJp?= =?utf-8?q?c_Le_Goater?= , Ganesh Goudar , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This adds nmi injection for pnv, and similar mce injection for spapr and pnv. The mce injection has already uncovered quite a few bugs in Linux papr guest and one in pnv host code, so it has been already very useful. The mambo simulator can do similar injection but it's a bit more clunky and needs to run KVM and QEMU in the sim to test papr guests, which is quite slow. HMIs like timebase corruption would be another good candidate for error injection. Thanks, Nick Nicholas Piggin (5): ppc/spapr: tweak change system reset helper ppc/pnv: Add support for NMI interface nmi: add MCE class for implementing machine check injection commands ppc/spapr: Implement mce injection ppc/pnv: Implement mce injection hmp-commands.hx | 20 ++++++++- hw/core/nmi.c | 61 ++++++++++++++++++++++++++ hw/ppc/pnv.c | 85 +++++++++++++++++++++++++++++++++++- hw/ppc/spapr.c | 63 ++++++++++++++++++++++++-- include/hw/nmi.h | 20 +++++++++ include/hw/ppc/spapr.h | 3 ++ include/monitor/hmp-target.h | 1 - include/monitor/hmp.h | 1 + monitor/hmp-cmds.c | 1 + target/ppc/cpu.h | 3 +- target/ppc/excp_helper.c | 17 ++++++-- target/ppc/monitor.c | 11 +++++ 12 files changed, 275 insertions(+), 11 deletions(-)