summaryrefslogtreecommitdiffstats
path: root/qemu-options.hx
diff options
context:
space:
mode:
authorMarkus Armbruster2016-04-18 18:29:50 +0200
committerMarkus Armbruster2016-04-19 16:09:50 +0200
commit63d3145aadbecaa7e8be1e74b5d6b5cbbeb4e153 (patch)
tree936d8220a33f29886da1760205636a81a1e95ddc /qemu-options.hx
parentMerge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20160419-1' into s... (diff)
downloadqemu-63d3145aadbecaa7e8be1e74b5d6b5cbbeb4e153.tar.gz
qemu-63d3145aadbecaa7e8be1e74b5d6b5cbbeb4e153.tar.xz
qemu-63d3145aadbecaa7e8be1e74b5d6b5cbbeb4e153.zip
fw_cfg: Adopt /opt/RFQDN convention
FW CFG's primary user is QEMU, which uses it to expose configuration information (in the widest sense) to Firmware. Thus the name FW CFG. FW CFG can also be used by others for their own purposes. QEMU is merely acting as transport then. Names starting with opt/ are reserved for such uses. There is no provision, however, to guide safe sharing among different such users. Fix that, loosely following QMP precedence: names should start with opt/RFQDN/, where RFQDN is a reverse fully qualified domain name you control. Based on a more ambitious patch from Michael Tsirkin. Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Gabriel L. Somlo <somlo@cmu.edu> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'qemu-options.hx')
-rw-r--r--qemu-options.hx24
1 files changed, 19 insertions, 5 deletions
diff --git a/qemu-options.hx b/qemu-options.hx
index 587de8f3cd..6106520c56 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2864,18 +2864,32 @@ ETEXI
DEF("fw_cfg", HAS_ARG, QEMU_OPTION_fwcfg,
"-fw_cfg [name=]<name>,file=<file>\n"
- " add named fw_cfg entry from file\n"
+ " add named fw_cfg entry with contents from file\n"
"-fw_cfg [name=]<name>,string=<str>\n"
- " add named fw_cfg entry from string\n",
+ " add named fw_cfg entry with contents from string\n",
QEMU_ARCH_ALL)
STEXI
+
@item -fw_cfg [name=]@var{name},file=@var{file}
@findex -fw_cfg
-Add named fw_cfg entry from file. @var{name} determines the name of
-the entry in the fw_cfg file directory exposed to the guest.
+Add named fw_cfg entry with contents from file @var{file}.
@item -fw_cfg [name=]@var{name},string=@var{str}
-Add named fw_cfg entry from string.
+Add named fw_cfg entry with contents from string @var{str}.
+
+The terminating NUL character of the contents of @var{str} will not be
+included as part of the fw_cfg item data. To insert contents with
+embedded NUL characters, you have to use the @var{file} parameter.
+
+The fw_cfg entries are passed by QEMU through to the guest.
+
+Example:
+@example
+ -fw_cfg name=opt/com.mycompany/blob,file=./my_blob.bin
+@end example
+creates an fw_cfg entry named opt/com.mycompany/blob with contents
+from ./my_blob.bin.
+
ETEXI
DEF("serial", HAS_ARG, QEMU_OPTION_serial, \