From: "Michael S. Tsirkin" <mst@redhat.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: "Tony Luck" <tony.luck@intel.com>,
"Kees Cook" <keescook@chromium.org>,
kvm@vger.kernel.org, "Radim Krčmář" <rkrcmar@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
"Anton Vorontsov" <anton@enomsg.org>,
"Will Deacon" <will.deacon@arm.com>,
qemu-devel@nongnu.org, "Steven Rostedt" <rostedt@goodmis.org>,
virtualization@lists.linux-foundation.org,
"Minchan Kim" <minchan@kernel.org>,
"Anthony Liguori" <aliguori@amazon.com>,
"Colin Cross" <ccross@android.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Ingo Molnar" <mingo@kernel.org>
Subject: Re: [RFC/PATCHSET 0/7] virtio: Implement virtio pstore device (v2)
Date: Thu, 28 Jul 2016 01:18:42 +0300 [thread overview]
Message-ID: <20160728011602-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <1469632111-23260-1-git-send-email-namhyung@kernel.org>
On Thu, Jul 28, 2016 at 12:08:24AM +0900, Namhyung Kim wrote:
> Hello,
>
> This is v2 of the virtio-pstore work. In this patchset I addressed
> most of feedbacks from previous version. Limiting disk size is not
> implemented yet.
For some reason, only parts of the patchset were received.
Pls post all patches to all lists.
If you are changing the virtio interface with host,
like a new device, they you must copy the virtio TC
so make sure there are no objections from there.
https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=virtio#feedback
> * changes in v2)
> - update VIRTIO_ID_PSTORE to 22 (Cornelia, Stefan)
> - make buffer size configurable (Cornelia)
> - support PSTORE_TYPE_CONSOLE (Kees)
> - use separate virtqueues for read and write
> - support concurrent async write
> - manage pstore (file) id in device side
> - fix various mistakes in qemu device (Stefan)
>
> It started from the fact that dumping ftrace buffer at kernel
> oops/panic takes too much time. Although there's a way to reduce the
> size of the original data, sometimes I want to have the information as
> many as possible. Maybe kexec/kdump can solve this problem but it
> consumes some portion of guest memory so I'd like to avoid it. And I
> know the qemu + crashtool can dump and analyze the whole guest memory
> including the ftrace buffer without wasting guest memory, but it adds
> one more layer and has some limitation as an out-of-tree tool like not
> being in sync with the kernel changes.
>
> So I think it'd be great using the pstore interface to dump guest
> kernel data on the host. One can read the data on the host directly
> or on the guest (at the next boot) using pstore filesystem as usual.
> While this patchset only implements dumping kernel log buffer, it can
> be extended to have ftrace buffer and probably some more..
>
> The patch 0001-0003 are preparation for pstore to support virtio
> device which requires async write. The patch 0004 implements virtio
> pstore driver. It has two virt queue for (sync) read and (async)
> write, pstore buffer and io request and response structure. The
> virtio_pstore_req struct is to give information about the current
> pstore operation. The result will be written to the virtio_pstore_res
> struct. For read operation it also uses virtio_pstore_fileinfo struct.
>
> The patch 0005 adds support for PSTORE_TYPE_CONSOLE which was
> requested by Kees. The console data is appended to a single file for
> now.
>
> The patch 0006 and 0007 implement virtio-pstore legacy PCI device on
> qemu-kvm and kvmtool respectively. I referenced virtio-baloon and
> virtio-rng implementations and I don't know whether kvmtool supports
> modern virtio 1.0+ spec. Other transports might be supported later.
>
> For example, using virtio-pstore on qemu looks like below:
>
> $ qemu-system-x86_64 -enable-kvm -device virtio-pstore,directory=xxx
>
> When guest kernel gets panic the log messages will be saved under the
> xxx directory.
>
> $ ls xxx
> dmesg-1.enc.z dmesg-2.enc.z
>
> As you can see the pstore subsystem compresses the log data using zlib
> (now supports lzo and lz4 too). The data can be extracted with the
> following command:
>
> $ cat xxx/dmesg-1.enc.z | \
> > python -c 'import sys, zlib; print(zlib.decompress(sys.stdin.read()))'
> Oops#1 Part1
> <5>[ 0.000000] Linux version 4.6.0kvm+ (namhyung@danjae) (gcc version 5.3.0 (GCC) ) #145 SMP Mon Jul 18 10:22:45 KST 2016
> <6>[ 0.000000] Command line: root=/dev/vda console=ttyS0
> <6>[ 0.000000] x86/fpu: Legacy x87 FPU detected.
> <6>[ 0.000000] x86/fpu: Using 'eager' FPU context switches.
> <6>[ 0.000000] e820: BIOS-provided physical RAM map:
> <6>[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
> <6>[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
> <6>[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
> <6>[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000007fddfff] usable
> <6>[ 0.000000] BIOS-e820: [mem 0x0000000007fde000-0x0000000007ffffff] reserved
> <6>[ 0.000000] BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved
> <6>[ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
> <6>[ 0.000000] NX (Execute Disable) protection: active
> <6>[ 0.000000] SMBIOS 2.8 present.
> <7>[ 0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.3-0-ge2fc41e-prebuilt.qemu-project.org 04/01/2014
> ...
>
> To enable PSTORE_TYPE_CONSOLE, add 'console=true' to virtio-pstore
> device option. Also 'bufsize' option can set different size for
> pstore buffer (default is 16K). Maybe we can add a config option to
> control the compression later.
>
> Currently the kvmtool doesn't support any options except the directory
> the pstore saves the logs.
>
>
> Namhyung Kim (7):
> pstore: Split pstore fragile flags
> pstore/ram: Set pstore flags dynamically
> pstore: Manage buffer position for async write
> virtio: Basic implementation of virtio pstore driver
> virtio-pstore: Support PSTORE_TYPE_CONSOLE
> qemu: Implement virtio-pstore device
> kvmtool: Implement virtio-pstore device
>
> drivers/acpi/apei/erst.c | 2 +-
> drivers/firmware/efi/efi-pstore.c | 4 +-
> drivers/virtio/Kconfig | 10 +
> drivers/virtio/Makefile | 1 +
> drivers/virtio/virtio_pstore.c | 421 +++++++++++++++++++++
> fs/pstore/platform.c | 65 +++-
> fs/pstore/ram.c | 8 +
> include/linux/pstore.h | 9 +-
> include/uapi/linux/Kbuild | 1 +
> include/uapi/linux/virtio_ids.h | 1 +
> include/uapi/linux/virtio_pstore.h | 78 +++-
> 11 files changed, 580 insertions(+), 20 deletions(-)
> create mode 100644 drivers/virtio/virtio_pstore.c
> create mode 100644 include/uapi/linux/virtio_pstore.h
>
>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Radim Krčmář <rkrcmar@redhat.com>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Anthony Liguori <aliguori@amazon.com>
> Cc: Anton Vorontsov <anton@enomsg.org>
> Cc: Colin Cross <ccross@android.com>
> Cc: Kees Cook <keescook@chromium.org>
> Cc: Tony Luck <tony.luck@intel.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Minchan Kim <minchan@kernel.org>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: kvm@vger.kernel.org
> Cc: qemu-devel@nongnu.org
> Cc: virtualization@lists.linux-foundation.org
>
> Thanks,
> Namhyung
>
>
> --
> 2.8.0
>
> _______________________________________________
> Virtualization mailing list
> Virtualization@lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/virtualization
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2016-07-27 22:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1469632111-23260-1-git-send-email-namhyung@kernel.org>
2016-07-27 15:08 ` [PATCH 1/7] pstore: Split pstore fragile flags Namhyung Kim
2016-07-27 15:08 ` [PATCH 2/7] pstore/ram: Set pstore flags dynamically Namhyung Kim
2016-07-27 15:08 ` [PATCH 3/7] pstore: Manage buffer position for async write Namhyung Kim
2016-07-27 15:08 ` [PATCH 4/7] virtio: Basic implementation of virtio pstore driver Namhyung Kim
2016-07-27 15:08 ` [PATCH 5/7] virtio-pstore: Support PSTORE_TYPE_CONSOLE Namhyung Kim
2016-07-27 15:08 ` [PATCH 6/7] qemu: Implement virtio-pstore device Namhyung Kim
2016-07-27 15:08 ` [PATCH 7/7] kvmtool: " Namhyung Kim
2016-07-27 22:18 ` Michael S. Tsirkin [this message]
2016-07-28 2:46 ` [RFC/PATCHSET 0/7] virtio: Implement virtio pstore device (v2) Namhyung Kim
[not found] ` <1469632111-23260-7-git-send-email-namhyung@kernel.org>
2016-07-28 0:02 ` [PATCH 6/7] qemu: Implement virtio-pstore device Michael S. Tsirkin
2016-07-28 5:39 ` Namhyung Kim
2016-07-28 12:56 ` Stefan Hajnoczi
[not found] ` <20160728125607.GA31002@stefanha-x1.localdomain>
2016-07-28 13:08 ` [Qemu-devel] " Daniel P. Berrange
2016-07-30 8:38 ` Namhyung Kim
2016-08-01 9:21 ` Daniel P. Berrange
2016-08-01 15:34 ` Namhyung Kim
2016-07-28 14:38 ` Steven Rostedt
2016-07-28 13:22 ` [Qemu-devel] " Daniel P. Berrange
2016-07-30 8:57 ` Namhyung Kim
2016-08-01 9:24 ` Daniel P. Berrange
2016-08-01 15:52 ` Namhyung Kim
2016-07-27 15:08 [RFC/PATCHSET 0/7] virtio: Implement virtio pstore device (v2) Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160728011602-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=aliguori@amazon.com \
--cc=anton@enomsg.org \
--cc=ccross@android.com \
--cc=keescook@chromium.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rkrcmar@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tony.luck@intel.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).