On Fri, Aug 01, 2025 at 02:42:26PM +0200, Igor Mammedov wrote:
> On Wed, 30 Jul 2025 17:47:52 -0400
> Peter Xu <[email protected]> wrote:
> 
> > On Wed, Jul 30, 2025 at 02:39:29PM +0200, Igor Mammedov wrote:
> > > diff --git a/system/memory.c b/system/memory.c
> > > index 5646547940..9a5a262112 100644
> > > --- a/system/memory.c
> > > +++ b/system/memory.c
> > > @@ -2546,6 +2546,12 @@ void 
> > > memory_region_clear_flush_coalesced(MemoryRegion *mr)
> > >      }
> > >  }
> > >  
> > > +void memory_region_enable_lockless_io(MemoryRegion *mr)
> > > +{
> > > +    mr->lockless_io = true;
> 
>     /*                                                                        
>                                                                
>      * reentrancy_guard has per device scope, that when enabled               
>                                                                
>      * will effectively prevent concurrent access to device's IO              
>                                                                
>      * MemoryRegion(s) by not calling accessor callback.                      
>                                                                
>      *                                                                        
>                                                                
>      * Turn it off for lock-less IO enabled devices, to allow                 
>                                                                
>      * concurrent IO.                                                         
>                                                                
>      * TODO: remove this when reentrancy_guard becomes per transaction.       
>    
>      */  
> 
> would something like this be sufficient?

Looks good to me, thanks!

-- 
Peter Xu


Reply via email to