qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, imammedo@redhat.com, berrange@redhat.com,
	ehabkost@redhat.com, anderson@redhat.com, lersek@redhat.com
Subject: Re: [Qemu-devel] [PATCH v5 3/8] fw_cfg: add vmcoreinfo file
Date: Sun, 10 Sep 2017 04:52:36 +0300	[thread overview]
Message-ID: <20170910044820-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <257507131.11042763.1504885786158.JavaMail.zimbra@redhat.com>

On Fri, Sep 08, 2017 at 11:49:46AM -0400, Marc-André Lureau wrote:
> Hi
> 
> ----- Original Message -----
> > On Fri, Sep 08, 2017 at 06:39:01PM +0300, Michael S. Tsirkin wrote:
> > > On Mon, Aug 07, 2017 at 08:16:13PM +0200, Marc-André Lureau wrote:
> > > > diff --git a/docs/specs/fw_cfg.txt b/docs/specs/fw_cfg.txt
> > > > index 08c00bdf44..37d0f9f40a 100644
> > > > --- a/docs/specs/fw_cfg.txt
> > > > +++ b/docs/specs/fw_cfg.txt
> > > > @@ -136,6 +136,22 @@ struct FWCfgFile {		/* an individual file entry, 64
> > > > bytes total */
> > > >      char name[56];		/* fw_cfg item name, NUL-terminated ascii */
> > > >  };
> > > >  
> > > > +=== etc/vmcoreinfo ===
> > > > +
> > > > +A guest may use this entry to add information details to qemu
> > > > +dumps. The entry gives location and size of an ELF note that is
> > > > +appended in qemu dumps.
> > > > +
> > > > +The entry is of 12 bytes with this format:
> > > > +
> > > > +struct FWCfgVMCoreInfo {
> > > > +    uint64_t paddr;             /* physical address of ELF note, LE */
> > > > +    uint32_t size;              /* size of ELF note region, LE */
> > > > +};
> > > > +
> > > > +The note format/class must be of the target bitness and the size must
> > > > +be less than 1Mb.
> > > > +
> > > 
> > > I would say adding a format bitmap would make sense for future
> > > compatibility.
> > > How about:
> > > 
> > > struct FWCfgVMCoreInfo {
> > >     uint16_t host_format;       /* Formats host supports. 0x1 LE - ELF
> > >     note. Other bits - ignored. */
> 
> Could this be added later?
>
> For ex, extend the entry to 16 bytes, with those 2 values appended?

I think aligned size is better overall so you can write
bindings in any language without issues.
I'm ok with just keeping 0s there for now if you prefer.


> If the size is 12, assume it is ELF note only, and that the host supports it.

Seems more like a hack that will make code ugly down the road.

> > >     uint16_t guest_format;      /* Formats guest supplies. Must be 0x1 LE
> > >     */
> > 
> > .. to set the ELF note info, or 0x0 to reset the device.
> > 
> > >     uint32_t size;              /* size of ELF note region, LE */
> > >     uint64_t paddr;             /* physical address of ELF note, LE */
> > > };
> > > 
> > > 
> > > >  === All Other Data Items ===
> > > >  
> > > >  Please consult the QEMU source for the most up-to-date and authoritative
> > > >  list
> > > > --
> > > > 2.14.0.1.geff633fa0
> > 

  reply	other threads:[~2017-09-10  1:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-07 18:16 [Qemu-devel] [PATCH v5 0/8] KASLR kernel dump support Marc-André Lureau
2017-08-07 18:16 ` [Qemu-devel] [PATCH v5 1/8] fw_cfg: rename read callback Marc-André Lureau
2017-08-07 18:16 ` [Qemu-devel] [PATCH v5 2/8] fw_cfg: add write callback Marc-André Lureau
2017-09-08 12:40   ` Michael S. Tsirkin
2017-08-07 18:16 ` [Qemu-devel] [PATCH v5 3/8] fw_cfg: add vmcoreinfo file Marc-André Lureau
2017-09-08 12:32   ` Michael S. Tsirkin
2017-09-08 12:36   ` Michael S. Tsirkin
2017-09-08 12:42   ` Michael S. Tsirkin
2017-09-08 15:39   ` Michael S. Tsirkin
2017-09-08 15:39     ` Michael S. Tsirkin
2017-09-08 15:49       ` Marc-André Lureau
2017-09-10  1:52         ` Michael S. Tsirkin [this message]
2017-08-07 18:16 ` [Qemu-devel] [PATCH v5 4/8] dump: add guest ELF note Marc-André Lureau
2017-08-07 18:16 ` [Qemu-devel] [PATCH v5 5/8] dump: update phys_base header field based on VMCOREINFO content Marc-André Lureau
2017-08-07 18:16 ` [Qemu-devel] [PATCH v5 6/8] kdump: set vmcoreinfo location Marc-André Lureau
2017-08-07 18:16 ` [Qemu-devel] [PATCH v5 7/8] scripts/dump-guest-memory.py: add vmcoreinfo Marc-André Lureau
2017-08-07 18:16 ` [Qemu-devel] [PATCH v5 8/8] MAINTAINERS: add Dump maintainers Marc-André Lureau
2017-08-16 20:15 ` [Qemu-devel] [PATCH v5 0/8] KASLR kernel dump support Michael S. Tsirkin
2017-09-08 12:46 ` Michael S. Tsirkin

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=20170910044820-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=anderson@redhat.com \
    --cc=berrange@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=lersek@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.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).