sof icon indicating copy to clipboard operation
sof copied to clipboard

[IPC4] make sure not to modify host memory window contents

Open lyakh opened this issue 3 years ago • 2 comments

Data, sent by the host to the DSP via the memory window should be read-only

lyakh avatar Oct 14 '22 14:10 lyakh

Also the wording "have to make sure ... window isn't modified by DSP" might need to be extended. This itself is not forbidden, but given our current design how we handle IPCs, the code does assume invalidation is only needed when IPCs are received. E.g. this data is read-only to DSP.

@kv2019i is there a good reason to modify that window in SOF? If in the IPC4 protocol that memory is only used for the host->DSP direction, then we better don't write to it. Not sure if the same window is used for the opposite direction IPCs. AFAIU it isn't.

lyakh avatar Oct 17 '22 08:10 lyakh

CI: a single expected sof-logger failure with IPC4 https://sof-ci.01.org/sofpr/PR6426/build1956/devicetest/?model=TGLU_RVP_NOCODEC_IPC4ZPH&testcase=check-sof-logger

lyakh avatar Oct 19 '22 09:10 lyakh

Code and check results look good. @lgirdwood @dbaluta @mmaka1 @marcinszkudlinski @abonislawski @ranj063 @RanderWang et al, please prioritize review of this PR. We need to merge this quickly as it affects so many files and lines.

kv2019i avatar Oct 19 '22 11:10 kv2019i

@lyakh can you give a summary of the most recent push? It's very hard to see from such a long patchset what has changed since last time. And is the series now ok w.r.t. module_adapter users?

kv2019i avatar Oct 21 '22 17:10 kv2019i

@lyakh maybe best to split this PR into smaller chunks, i.e so that less controversial patches can be merged.

lgirdwood avatar Oct 24 '22 14:10 lgirdwood

@lyakh maybe best to split this PR into smaller chunks, i.e so that less controversial patches can be merged.

@lgirdwood it might be easier technically but it wouldn't be very useful logically - if you make that area const, you want it const everywhere, not just in some cases. After we merge #6473 this PR will become 2 commits shorted

lyakh avatar Oct 25 '22 07:10 lyakh

@jxstelter @dbaluta are the updates good for you ?

lgirdwood avatar Oct 26 '22 10:10 lgirdwood

@dbaluta can you try this with your DMA based scheduling ?

lgirdwood avatar Oct 26 '22 14:10 lgirdwood