Re: [Qemu-devel] [PATCH v2 10/18] hw/nvram/fw_cfg: Add reboot_timeout to FWCfgState

2019-03-08 Thread Michael S. Tsirkin
On Fri, Mar 08, 2019 at 02:32:14AM +0100, Philippe Mathieu-Daudé wrote: > Due to the contract interface of fw_cfg_add_file(), the > 'reboot_timeout' data has to be valid for the lifetime of the > FwCfg object. For this reason it is copied on the heap with > memdup(). > > The object state, 'FWCfgSt

Re: [Qemu-devel] [PATCH v2 10/18] hw/nvram/fw_cfg: Add reboot_timeout to FWCfgState

2019-03-08 Thread Philippe Mathieu-Daudé
On 3/8/19 12:22 PM, Philippe Mathieu-Daudé wrote: > On 3/8/19 12:04 PM, Laszlo Ersek wrote: >> Hi Phil, >> >> On 03/08/19 02:32, Philippe Mathieu-Daudé wrote: >>> Due to the contract interface of fw_cfg_add_file(), the >>> 'reboot_timeout' data has to be valid for the lifetime of the >>> FwCfg obje

Re: [Qemu-devel] [PATCH v2 10/18] hw/nvram/fw_cfg: Add reboot_timeout to FWCfgState

2019-03-08 Thread Philippe Mathieu-Daudé
On 3/8/19 12:04 PM, Laszlo Ersek wrote: > Hi Phil, > > On 03/08/19 02:32, Philippe Mathieu-Daudé wrote: >> Due to the contract interface of fw_cfg_add_file(), the >> 'reboot_timeout' data has to be valid for the lifetime of the >> FwCfg object. For this reason it is copied on the heap with >> memd

Re: [Qemu-devel] [PATCH v2 10/18] hw/nvram/fw_cfg: Add reboot_timeout to FWCfgState

2019-03-08 Thread Laszlo Ersek
Hi Phil, On 03/08/19 02:32, Philippe Mathieu-Daudé wrote: > Due to the contract interface of fw_cfg_add_file(), the > 'reboot_timeout' data has to be valid for the lifetime of the > FwCfg object. For this reason it is copied on the heap with > memdup(). > > The object state, 'FWCfgState', is also

[Qemu-devel] [PATCH v2 10/18] hw/nvram/fw_cfg: Add reboot_timeout to FWCfgState

2019-03-07 Thread Philippe Mathieu-Daudé
Due to the contract interface of fw_cfg_add_file(), the 'reboot_timeout' data has to be valid for the lifetime of the FwCfg object. For this reason it is copied on the heap with memdup(). The object state, 'FWCfgState', is also meant to be valid during the lifetime of the object. Move the 'reboot_