linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: open list <linux-kernel@vger.kernel.org>,
	keescook@chromium.org, anton@enomsg.org, ccross@android.com,
	tony luck <tony.luck@intel.com>, Ladi Prosek <lprosek@redhat.com>
Subject: Re: pstore to save vmcoreinfo for hypervisors
Date: Wed, 19 Apr 2017 04:19:54 -0400 (EDT)	[thread overview]
Message-ID: <1713017371.14449324.1492589994822.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <CAJ+F1CLRo5J8+T+vwcoZYyP4kX5_KZvo5x1SeHZ+oX1pa3wbcw@mail.gmail.com>


> It would be interesting to have this information during early kernel boot,
> but which mechanism should be used? pstore seems like an option. There
> could be a new PSTORE_TYPE_VMCOREINFO with the same content as
> /sys/kernel/vmcoreinfo. During boot, the kernel could remove older entries
> if any and add the up to date info (if it detects a VM). qemu or other
> hypervisor could then retrieve it for the dump, likely from an ACPI ERST
> space (EFI var shouldn't be accessed from host according to some
> developpers).

I think that pstore would not be saved by dump-guest-memory in general
(it would with ramoops, but not in general).  I think we need to save
the dump info in an out-of-band channel.

For example, we could have a simple device consisting of a single 4-byte
I/O port, with the following protocol:

- writing zero to the I/O port resets the information

- writing nonzero to the I/O port sets the "type" of the dump information,
  e.g. 1 for Linux vmcoreinfo and 2 for Windows KeInitializeCrashDumpHeader.

- after writing the type, you write the base of the dump header and then
  the length

- if all three values have been written, dump-guest-memory copies the
  data to an ELF note, whose name depends on the "type" value (e.g.
  "VMCOREINFO" for type 1, ".QEMU.WindowsCrashDumpHeader" for type 2).
  The three values are also migrated of course.

The device can be discovered via ACPI like pvpanic.

Paolo

           reply	other threads:[~2017-04-19  8:20 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CAJ+F1CLRo5J8+T+vwcoZYyP4kX5_KZvo5x1SeHZ+oX1pa3wbcw@mail.gmail.com>]

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=1713017371.14449324.1492589994822.JavaMail.zimbra@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=anton@enomsg.org \
    --cc=ccross@android.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lprosek@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=tony.luck@intel.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).