On Wed, Aug 8, 2018 at 10:32 PM Alistair Francis <alistai...@gmail.com> wrote: > On Fri, Aug 3, 2018 at 7:47 AM, Stefan Hajnoczi <stefa...@redhat.com> wrote: > > @@ -1168,6 +1172,34 @@ void rom_reset_order_override(void) > > fw_cfg_reset_order_override(fw_cfg); > > } > > > > +void rom_transaction_begin(void) > > +{ > > + Rom *rom; > > + > > + /* Ignore ROMs added without the transaction API */ > > + QTAILQ_FOREACH(rom, &roms, next) { > > + rom->committed = true; > > My only thought is that maybe this should produce a warning or error > if a ROM isn't committed.
Not all loaders use the transaction API. Therefore it is likely that some pre-existing ROMs will have ->committed = false. For example, imagine a firmware ROM is loaded by the machine type and then -kernel is used to load a file. The -kernel loader shouldn't worry about the firmware ROM, which was added without the transaction API. If we want to be strict I'd have to audit all ROM API users and wrap them in add rom_transaction_begin/end() even if they cannot fail. This is why I decided to simply ignore pre-existing ROMs. Stefan