Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6985945yba; Thu, 2 May 2019 02:00:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqyB8S85E3yVBHDrVVYn6Y5+7nMJEo8qMqTp2B0Wv/9EpD34sNLRvvGyIpViGIbLE2L+pfl1 X-Received: by 2002:a63:cc0c:: with SMTP id x12mr2710244pgf.336.1556787645408; Thu, 02 May 2019 02:00:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556787645; cv=none; d=google.com; s=arc-20160816; b=k63ShDK6icAFInTNJv55jXwv3FFObfbkheU1UjIufg4oY2kaqOZF0QB1Y5IRWD4BIG mm9kuIDtuLqUl/0Zp20d6Pc6lOh1hjkZwKn++N9SGJxnPvDqg0N7m8jguYNPJ3yc+nV6 fI/dnFOg6BYXPnWsu8RgMnavDzYLDSDaxGSkDplSHsk9nzHr9/eP6O+omhKq9hkuVRkc sL6M4jNtwKvB948he3gUZQFPzk3/lxTr7Ahr+shWc+sOdcBL53/JN03AE4ft46gdySkQ wdlxxyhFx3m7+ymd6VwDq6YDKbib3Z5Uf3mNe6+rAM63BmKbkQgpRifS8DISY2RZaQgp 8qIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=nR2hjJ7UdjaiCokIC7QFZTHdxkSdbYuSlKgyi1UOJCc=; b=ltoltRDy/2nrmUgbMkU1YT5H9kKGFMb/kGQ20Px77BEBKop1sA7JxDwJLXplrS53V3 zL2aC42ShVIy0RaEg+tDcoa4WVQgReg2z/X8uGbURLjTk6Gs3cmzMU1CY9/mHzbPYbFT eBCgbau5rYGLjoaR0zyUm4SpbDn/3IoyAL4asYGtQy7r/1b1L9KJDj+TDtDKcK3bc7Qe 0xsDcMmAyN96KT16/hCvBMoaKMz7irDonRgUF0us/lkFnQjXt/1qgZJLtdQCfwnPis0q hFYv6ZDi8i4SDuSdRCs1BzP5tvkm8bVmrlO1p+oaANMzREh0hkyC7QxCRgvTCVJ+xb6z Bi2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FnuyaiZM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a3si12411805plm.189.2019.05.02.02.00.29; Thu, 02 May 2019 02:00:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FnuyaiZM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726369AbfEBI7h (ORCPT + 99 others); Thu, 2 May 2019 04:59:37 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:44440 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726020AbfEBI7g (ORCPT ); Thu, 2 May 2019 04:59:36 -0400 Received: by mail-pl1-f194.google.com with SMTP id l2so710427plt.11 for ; Thu, 02 May 2019 01:59:36 -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; bh=nR2hjJ7UdjaiCokIC7QFZTHdxkSdbYuSlKgyi1UOJCc=; b=FnuyaiZMo6zoeUzdXDAHbFFLF00XiKpUHFgqrqvQehNz3iMJgPm/q/ku3A+M+AqYtW YIXUfXzGJhU9zGQVsLZIU/h2BiWsH6o33gQLZBqOnbHR4ZEpcgcF/rGxEXcnDBV1zE40 TeGX/L/peWegooaY8tXN45iGg4Pm53yNeUjL8CuwNZK+Nn52TWWPN6Ks770WFgqJSZNl Hv6ueikGZB+0E7k9I6js7oKP8o0pkBQHxD4rWWigT+cwXxVvqXkUVdKN7nHqiEaSgNV4 80KPtejo0AmGUj9M2rz3AYdog0XN8qmSCL1LntJ8yvhIUNKm3zR4U7T0JkC1ywdxBx8n g28Q== 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; bh=nR2hjJ7UdjaiCokIC7QFZTHdxkSdbYuSlKgyi1UOJCc=; b=MH32zcW67tZ/nycDD5c1r8IO7O1eBkYll+yjqg6TpaODwSIBGKF8U6lRaF3r2ERUhE QqtmPNWDHhcu1tP6quoYjX1zBiPWfOoQsKykLhn7WMf5+yCpAJlzi6Eo5fB8QlfruYww DSpFp+hMBKr0VHWnLTGNT7IGmFnvXAGJ6xCDKaAf6T8E8MY7FtLikE85lFZN2E3UR6vu aq6XAKi/MFkjtnlbhy6MX0fmG7Img5GQgYYcv/NwOkcBCqkmprM8zgpVslHtZ2QEIVjc zwSCPkf/2xJLc81KEyaviASXKjx0EwZyPArHFTfF6z6QRGsZeIMP4T6pPCXbh70fJnWY UoSQ== X-Gm-Message-State: APjAAAXS+TZPO7xXuOBNvibigYBPYMP31WXcwbBDiAkaZ8BzH2NkRh2a jq7GIpExxd5qX6H19qNxXHM= X-Received: by 2002:a17:902:294b:: with SMTP id g69mr2491883plb.57.1556787576324; Thu, 02 May 2019 01:59:36 -0700 (PDT) Received: from localhost.localdomain ([240f:34:212d:1:1b24:991b:df50:ea3f]) by smtp.gmail.com with ESMTPSA id z7sm74960831pgh.81.2019.05.02.01.59.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 May 2019 01:59:35 -0700 (PDT) From: Akinobu Mita To: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Akinobu Mita , Johannes Berg , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg Subject: [PATCH 0/4] nvme-pci: support device coredump Date: Thu, 2 May 2019 17:59:17 +0900 Message-Id: <1556787561-5113-1-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This enables to capture snapshot of controller information via device coredump machanism, and it helps diagnose and debug issues. The nvme device coredump is triggered before resetting the controller caused by I/O timeout, and creates the following coredump files. - regs: NVMe controller registers, including each I/O queue doorbell registers, in nvme-show-regs style text format. - sq: I/O submission queue - cq: I/O completion queue The device coredump mechanism currently allows drivers to create only a single coredump file, so this also provides a new function that allows drivers to create several device coredump files in one crashed device. Akinobu Mita (4): devcoredump: use memory_read_from_buffer devcoredump: allow to create several coredump files in one device nvme-pci: add device coredump support nvme-pci: trigger device coredump before resetting controller drivers/base/devcoredump.c | 173 +++++++++++++++++++----------- drivers/nvme/host/Kconfig | 1 + drivers/nvme/host/pci.c | 252 +++++++++++++++++++++++++++++++++++++++++--- include/linux/devcoredump.h | 33 ++++++ 4 files changed, 387 insertions(+), 72 deletions(-) Cc: Johannes Berg Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg -- 2.7.4