aboutsummaryrefslogtreecommitdiff
path: root/qemu-options-wrapper.h
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2019-01-18 23:31:52 +0100
committerMichael S. Tsirkin <mst@redhat.com>2019-02-05 10:58:33 -0500
commit3b3df3e52dd6adff483d8626c8f0801fd0ac05df (patch)
tree3f1c351210b3f8ea7b574f5f22f118c677f10504 /qemu-options-wrapper.h
parent24cf5413aa059f874c34e442802ce25cd1e72178 (diff)
fw_cfg: fix the life cycle and the name of "qemu_extra_params_fw"
Commit 19bcc4bc3213 ("fw_cfg: Make qemu_extra_params_fw locally", 2019-01-04) changed the storage duration of the "qemu_extra_params_fw" array from static to automatic. This broke the interface contract on the fw_cfg_add_file() function, which is documented as follows, in "include/hw/nvram/fw_cfg.h": > [...] The data referenced by the starting pointer is only linked, NOT > copied, into the data structure of the fw_cfg device. [...] As a result, when guest firmware fetches the "etc/boot-menu-wait" fw_cfg file, it now sees garbage. Fix the regression by changing the storage duration to allocated. (The call is reached at most once, on the realize path of the board-specific fw_cfg sysbus device.) While at it, clean up the name and the assignment of the object as well. Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Fixes: 19bcc4bc3213e78c303ad480a7a578f62258252d Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Li Qiang <liq3ea@gmail.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'qemu-options-wrapper.h')
0 files changed, 0 insertions, 0 deletions