> On 8/2/23 06:08, Mikhail Tyutin wrote:
> > The fix is to clear TLB_INVALID_MASK bit in tlb_addr, as it happens in 
> > other places e.g.
> > load_helper().
> >
> > Signed-off-by: Dmitriy Solovev <[email protected]>
> > Signed-off-by: Mikhail Tyutin <[email protected]>
> > ---
> >   accel/tcg/cputlb.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> The other places in load_helper happen only directly after tlb_fill has 
> succeeded.  Here
> you have no such guarantee.
> 
> I think perhaps the save_iotlb_data() call should be applied to loads as 
> well, and then
> tlb_plugin_lookup simplified.
> 

Hello Richard,

We performed testing on more scenarios and noticed that patch when 
save_iotlb_data() call is added to io_readx
(https://patchew.org/QEMU/[email protected]/). It 
doesn't work for addresses
in OCRAM region. Those accessed bypass io_writex/io_readx function and 
therefore don’t invoke save_iotlb_data().
So we observe the wrong value of cpu->saved_iotlb for it.

Would not be better to get back to initial v1 approach when we clean 
TLB_INVALID_MASK flag in
tlb_plugin_lookup()? It works well for those regions.
(https://patchew.org/QEMU/[email protected])

Reply via email to