qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Gabriel L. Somlo" <gsomlo@gmail.com>
To: Matt Fleming <matt.fleming@intel.com>
Cc: mdroth@linux.vnet.ibm.com, Laszlo Ersek <lersek@redhat.com>,
	rjones@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC PATCH 0/2] host->guest environment variables via fw_cfg
Date: Wed, 25 Feb 2015 20:13:20 -0500	[thread overview]
Message-ID: <20150226011319.GA24405@foober.ini.cmu.edu> (raw)
In-Reply-To: <1424904034.21588.19.camel@mfleming-mobl1.ger.corp.intel.com>

On Wed, Feb 25, 2015 at 10:40:34PM +0000, Matt Fleming wrote:
> 
> Right, I was thinking about this in the context of configuring the BIOS
> (OVMF in my case) with runtime tunable knobs instead of having to
> recompile the BIOS image from scratch.
> 
> I'll carve out some time to review your patches Gabriel.

Thanks ! Although the more I think about it, the more I like the idea
of simply adding a generic named blob to fw_cfg from the host side
(rather than adding a dedicated "-guestenv 'foo=bar'" option.

If I make sure the generic "-fwcfg name='blob-name',file=./blob_file"
is processed *after* everything else is already inserted into fw_cfg,
and that we throw an error if 'blob-name' collides with anything
already added during qemu setup, there's no reason I can't pass a
blob named 'etc/guest-info'.

So I'll send out a v2 attempting to do that, which should take care of
both of our needs on the host side.


On the guest side, you should be taken care of -- read whatever you
need to read from fw_cfg using the BIOS's existing mechanisms.


For myself, I'm tempted to write a kernel driver to allow me to simply
"cat /sys/firmware/fw_cfg/etc/guestinfo | grep '^key_name='" when I
need to retrieve a guest environment variable.

However, I'd first need to figure out how to do the equivalent thing
on Windows, and whether the requirement to add a kernel module is
worth it when my main purpose is making it easy to recycle VMWare VMs
which use "vmware-tools --cmd info-get guestinfo.key_name" :)

Maybe it's better to stick with accessing the fw_cfg io ports from
guest-side userspace, so patch 2/2 should stand as is (modulo Daniel's
suggestion to make it a separate binary from "qemu-ga", of course).


Thanks,
--Gabriel

  reply	other threads:[~2015-02-26  1:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24 19:43 [Qemu-devel] [RFC PATCH 0/2] host->guest environment variables via fw_cfg Gabriel L. Somlo
2015-02-24 19:43 ` [Qemu-devel] [RFC PATCH 1/2] fw_cfg: Add -guestenv qemu command line option Gabriel L. Somlo
2015-02-24 19:43 ` [Qemu-devel] [RFC PATCH 2/2] qga: add --getenv option to get env. vars from fw_cfg Gabriel L. Somlo
2015-02-25  9:09   ` Daniel P. Berrange
2015-02-24 23:07 ` [Qemu-devel] [RFC PATCH 0/2] host->guest environment variables via fw_cfg Laszlo Ersek
2015-02-25 22:40   ` Matt Fleming
2015-02-26  1:13     ` Gabriel L. Somlo [this message]
2015-02-26  9:45       ` Laszlo Ersek
2015-02-26 10:55         ` Matt Fleming
2015-02-26 11:13         ` Richard W.M. Jones

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=20150226011319.GA24405@foober.ini.cmu.edu \
    --to=gsomlo@gmail.com \
    --cc=lersek@redhat.com \
    --cc=matt.fleming@intel.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.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).