All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Eduardo Habkost <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
	qemu-arm@nongnu.org, Igor Mammedov <imammedo@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH 1/5] hw/smbios: support loading OEM strings values from a file
Date: Wed, 9 Sep 2020 10:00:28 +0100	[thread overview]
Message-ID: <20200909090028.GK1011023@redhat.com> (raw)
In-Reply-To: <c7ecee55-64a3-5a46-26d9-6a1cc4c7889c@redhat.com>

On Wed, Sep 09, 2020 at 10:18:47AM +0200, Laszlo Ersek wrote:
> On 09/08/20 18:54, Daniel P. Berrangé wrote:
> > Some applications want to pass quite large values for the OEM strings
> > entries. Rather than having huge strings on the command line, it would
> > be better to load them from a file, as supported with -fw_cfg.
> > 
> > This introduces the "valuefile" parameter allowing for:
> > 
> >   $ echo -n "thisthing" > mydata.txt
> >   $ qemu-system-x86_64 \
> >     -smbios type=11,value=something \
> >     -smbios type=11,valuefile=mydata.txt \
> >     -smbios type=11,value=somemore \
> >     ...other args...
> > 
> > Now in the guest
> > 
> > $ dmidecide -t 11
> > Getting SMBIOS data from sysfs.
> > SMBIOS 2.8 present.
> > 
> > Handle 0x0E00, DMI type 11, 5 bytes
> > OEM Strings
> > 	String 1: something
> > 	String 2: thisthing
> > 	String 3: somemore
> > 
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> >  hw/smbios/smbios.c | 72 +++++++++++++++++++++++++++++++++++++---------
> >  1 file changed, 59 insertions(+), 13 deletions(-)
> 
> (gearing up to test this / look into the edk2 problem, just one question
> in passing: could we / would we simplify this with g_file_get_contents()?)

Yes, but at the cost of loosing the ability to pass in a pre-opened
FD, which qemu_open allows for.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2020-09-09  9:01 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08 16:54 [PATCH 0/5] Add support for loading SMBIOS OEM strings from a file Daniel P. Berrangé
2020-09-08 16:54 ` [PATCH 1/5] hw/smbios: support loading OEM strings values " Daniel P. Berrangé
2020-09-08 18:24   ` Philippe Mathieu-Daudé
2020-09-09  7:35     ` Daniel P. Berrangé
2020-09-09  8:33       ` Philippe Mathieu-Daudé
2020-09-09  8:18   ` Laszlo Ersek
2020-09-09  9:00     ` Daniel P. Berrangé [this message]
2020-09-09  9:10     ` Daniel P. Berrangé
2020-09-09  8:24   ` Laszlo Ersek
2020-09-08 16:54 ` [PATCH 2/5] hw/smbios: report error if table size is too large Daniel P. Berrangé
2020-09-08 18:25   ` Philippe Mathieu-Daudé
2020-09-14  8:02   ` Igor Mammedov
2020-09-08 16:54 ` [PATCH 3/5] qemu-options: document SMBIOS type 11 settings Daniel P. Berrangé
2020-09-08 18:27   ` Philippe Mathieu-Daudé
2020-09-08 16:54 ` [PATCH 4/5] hw/smbios: use qapi for SMBIOS entry point type enum Daniel P. Berrangé
2020-09-08 18:29   ` Philippe Mathieu-Daudé
2020-09-09  7:36     ` Daniel P. Berrangé
2020-09-08 18:37   ` Philippe Mathieu-Daudé
2020-12-09 17:56   ` Eduardo Habkost
2020-09-08 16:54 ` [PATCH 5/5] hw/i386: expose a "smbios_ep" PC machine property Daniel P. Berrangé
2020-09-08 18:38   ` Philippe Mathieu-Daudé
2020-09-09  8:28   ` Laszlo Ersek
2020-09-09  9:44 ` [PATCH 0/5] Add support for loading SMBIOS OEM strings from a file Laszlo Ersek
2020-09-09  9:50   ` Daniel P. Berrangé
2020-09-09 10:58     ` Laszlo Ersek

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=20200909090028.GK1011023@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.