From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqrQT-0007Oq-67 for qemu-devel@nongnu.org; Sat, 09 Sep 2017 21:52:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dqrQQ-0000RC-42 for qemu-devel@nongnu.org; Sat, 09 Sep 2017 21:52:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34536) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dqrQP-0000Ny-Rf for qemu-devel@nongnu.org; Sat, 09 Sep 2017 21:52:42 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C86185D686 for ; Sun, 10 Sep 2017 01:52:39 +0000 (UTC) Date: Sun, 10 Sep 2017 04:52:36 +0300 From: "Michael S. Tsirkin" Message-ID: <20170910044820-mutt-send-email-mst@kernel.org> References: <20170807181618.22562-1-marcandre.lureau@redhat.com> <20170807181618.22562-4-marcandre.lureau@redhat.com> <20170908183337-mutt-send-email-mst@kernel.org> <20170908183915-mutt-send-email-mst@kernel.org> <257507131.11042763.1504885786158.JavaMail.zimbra@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <257507131.11042763.1504885786158.JavaMail.zimbra@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v5 3/8] fw_cfg: add vmcoreinfo file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Marc-Andr=E9?= Lureau Cc: qemu-devel@nongnu.org, imammedo@redhat.com, berrange@redhat.com, ehabkost@redhat.com, anderson@redhat.com, lersek@redhat.com On Fri, Sep 08, 2017 at 11:49:46AM -0400, Marc-Andr=E9 Lureau wrote: > Hi >=20 > ----- 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=E9 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 en= try, 64 > > > > bytes total */ > > > > char name[56]; /* fw_cfg item name, NUL-terminated ascii */ > > > > }; > > > > =20 > > > > +=3D=3D=3D etc/vmcoreinfo =3D=3D=3D > > > > + > > > > +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. > > > > + > > >=20 > > > I would say adding a format bitmap would make sense for future > > > compatibility. > > > How about: > > >=20 > > > struct FWCfgVMCoreInfo { > > > uint16_t host_format; /* Formats host supports. 0x1 LE - = ELF > > > note. Other bits - ignored. */ >=20 > 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 suppor= ts 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 > > > */ > >=20 > > .. to set the ELF note info, or 0x0 to reset the device. > >=20 > > > uint32_t size; /* size of ELF note region, LE */ > > > uint64_t paddr; /* physical address of ELF note, LE= */ > > > }; > > >=20 > > >=20 > > > > =3D=3D=3D All Other Data Items =3D=3D=3D > > > > =20 > > > > Please consult the QEMU source for the most up-to-date and autho= ritative > > > > list > > > > -- > > > > 2.14.0.1.geff633fa0 > >=20