On Friday, March 22, 2024 5:06 PM Gerd Hoffmann wrote:
> 
> > > But then you have to find and update all callsites (or at least the
> > > ones where we care about measurement).
> > In your solution,  if we cache all items that need to be measured, we
> > would have to add a new API (example: QemuFwCfgGetDataFromCache ())  to
> get the data from cache.
> 
> No, we only need to update QemuFwCfgSelectItem + QemuFwCfgReadBytes to
> support reading from the cache.
Do you mean the existing API (QemuFwCfgSelectItem + QemuFwCfgReadBytes) need to 
be changed to support reading from the cache?

If that is the case,  there are some concerns as below:
1:  One or more new parameters (of QemuFwCfgReadBytes())  need to be added to 
search 
the item in cache, which is equivalent to adding a new API.

2:  The current QemuFwCfgReadBytes can read in chunks from qemu (example 
etc/e820) 
If we call QemuFwCfgReadBytes to get data from cache , we also need to support 
reading in chunks.
Then we have to add more parameters ( to set offset). This will make the API 
more and more complicated.

> QemuFwCfgGetDataFromCache() can be added as additional API, and callsites 
> have the option to either switch over, or continue to use the existing API.
Base above concerns, we think QemuFwCfgGetDataFromCache is must.

Thanks
Ceping




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117105): https://edk2.groups.io/g/devel/message/117105
Mute This Topic: https://groups.io/mt/104880546/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to