qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [Qemu-devel] [PATCH v4 4/6] loader: add rom transaction A


From: Stefan Hajnoczi
Subject: Re: [Qemu-arm] [Qemu-devel] [PATCH v4 4/6] loader: add rom transaction API
Date: Mon, 13 Aug 2018 10:58:36 +0100

On Wed, Aug 8, 2018 at 10:32 PM Alistair Francis <address@hidden> wrote:
> On Fri, Aug 3, 2018 at 7:47 AM, Stefan Hajnoczi <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]