From: Stefan Hajnoczi <stefanha@gmail.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Radim Kr??m???? <rkrcmar@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Anthony Liguori <aliguori@amazon.com>,
Anton Vorontsov <anton@enomsg.org>,
Colin Cross <ccross@android.com>,
Kees Cook <keescook@chromium.org>,
Tony Luck <tony.luck@intel.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@kernel.org>, Minchan Kim <minchan@kernel.org>,
kvm@vger.kernel.org, qemu-devel@nongnu.org,
virtualization@lists.linux-foundation.org
Subject: Re: [Qemu-devel] [PATCH 2/3] qemu: Implement virtio-pstore device
Date: Wed, 20 Jul 2016 09:29:06 +0100 [thread overview]
Message-ID: <20160720082906.GB13233@stefanha-x1.localdomain> (raw)
In-Reply-To: <20160718142118.GA16575@danjae.aot.lge.com>
[-- Attachment #1: Type: text/plain, Size: 1995 bytes --]
On Mon, Jul 18, 2016 at 11:21:18PM +0900, Namhyung Kim wrote:
> On Mon, Jul 18, 2016 at 11:03:53AM +0100, Stefan Hajnoczi wrote:
> > On Mon, Jul 18, 2016 at 01:37:40PM +0900, Namhyung Kim wrote:
> > > From: Namhyung Kim <namhyung@gmail.com>
> > >
> > > Add virtio pstore device to allow kernel log files saved on the host.
> > > It will save the log files on the directory given by pstore device
> > > option.
> > >
> > > $ qemu-system-x86_64 -device virtio-pstore,directory=dir-xx ...
> > >
> > > (guest) # echo c > /proc/sysrq-trigger
> > >
> > > $ ls dir-xx
> > > dmesg-0.enc.z dmesg-1.enc.z
> > >
> > > The log files are usually compressed using zlib. Users can see the log
> > > messages directly on the host or on the guest (using pstore filesystem).
> >
> > The implementation is synchronous (i.e. can pause guest code execution),
> > does not handle write errors, and does not limit the amount of data the
> > guest can write. This is sufficient for ad-hoc debugging and usage with
> > trusted guests.
> >
> > If you want this to be available in environments where the guest isn't
> > trusted then there must be a limit on how much the guest can write or
> > some kind of log rotation.
>
> Right. The synchronous IO is required by the pstore subsystem
> implementation AFAIK (it uses a single psinfo->buf in the loop).
The pstore subsystem in Linux may be synchronous but the QEMU device
emulation does not have to be synchronous.
Synchronous device emulation means that no other vcpu or QEMU main loop
processing can occur while device emulation is blocked in a syscall.
This can make the QEMU monitor unavailable for libvirt and management
tools. The guest can experience jitter since vcpus freeze if they
vmexit while device emulation is blocked (it holds the QEMU global
mutex and prevents other QEMU threads from making progress).
You could use include/io.h for asynchronous I/O (qio_channel_add_watch()).
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2016-07-20 11:32 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-18 4:37 [Qemu-devel] [RFC/PATCHSET 0/3] virtio-pstore: Implement virtio pstore device Namhyung Kim
2016-07-18 4:37 ` [Qemu-devel] [PATCH 1/3] virtio: Basic implementation of virtio pstore driver Namhyung Kim
2016-07-18 5:12 ` Kees Cook
2016-07-18 5:50 ` Namhyung Kim
2016-07-18 17:50 ` Kees Cook
2016-07-19 13:43 ` Namhyung Kim
2016-07-19 15:32 ` Namhyung Kim
2016-07-20 12:56 ` Namhyung Kim
2016-07-18 7:54 ` Cornelia Huck
2016-07-18 8:29 ` Namhyung Kim
2016-07-18 9:02 ` Cornelia Huck
2016-07-18 4:37 ` [Qemu-devel] [PATCH 2/3] qemu: Implement virtio-pstore device Namhyung Kim
2016-07-18 7:28 ` Christian Borntraeger
2016-07-18 8:33 ` Namhyung Kim
2016-07-18 10:03 ` Stefan Hajnoczi
2016-07-18 14:21 ` Namhyung Kim
2016-07-20 8:29 ` Stefan Hajnoczi [this message]
2016-07-20 12:46 ` Namhyung Kim
2016-07-19 15:48 ` Namhyung Kim
2016-07-20 8:21 ` Stefan Hajnoczi
2016-07-20 12:30 ` Namhyung Kim
-- strict thread matches above, loose matches on Subject: below --
2016-08-20 8:07 [Qemu-devel] [RFC/PATCHSET 0/3] virtio: Implement virtio pstore device (v3) Namhyung Kim
2016-08-20 8:07 ` [Qemu-devel] [PATCH 2/3] qemu: Implement virtio-pstore device Namhyung Kim
2016-08-24 22:00 ` Daniel P. Berrange
2016-08-26 4:48 ` Namhyung Kim
2016-08-26 12:27 ` Daniel P. Berrange
2016-09-13 15:57 ` Michael S. Tsirkin
2016-09-16 10:05 ` Namhyung Kim
2016-11-10 22:50 ` Michael S. Tsirkin
2016-11-15 6:23 ` Namhyung Kim
2016-11-15 14:38 ` Michael S. Tsirkin
2016-08-31 8:07 [Qemu-devel] [RFC/PATCHSET 0/3] virtio: Implement virtio pstore device (v4) Namhyung Kim
2016-08-31 8:08 ` [Qemu-devel] [PATCH 2/3] qemu: Implement virtio-pstore device Namhyung Kim
2016-09-04 14:38 [Qemu-devel] [RFC/PATCHSET 0/3] virtio: Implement virtio pstore device (v5) Namhyung Kim
2016-09-04 14:38 ` [Qemu-devel] [PATCH 2/3] qemu: Implement virtio-pstore device Namhyung Kim
2016-09-22 12:23 ` Stefan Hajnoczi
2016-09-23 5:52 ` 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=20160720082906.GB13233@stefanha-x1.localdomain \
--to=stefanha@gmail.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=mst@redhat.com \
--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 \
/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).