On 26/05/2015 10:40, Fam Zheng wrote:
> > @@ -1329,7 +1329,11 @@ bool memory_region_is_skip_dump(MemoryRegion *mr)
> >  
> >  uint8_t memory_region_get_dirty_log_mask(MemoryRegion *mr)
> >  {
> > -    return mr->dirty_log_mask;
> > +    uint8_t mask = mr->dirty_log_mask;
> > +    if (global_dirty_log) {
> > +        mask |= (1 << DIRTY_MEMORY_MIGRATION);
> 
> This is ugly, but I don't know how to do differently. :(
Why do you think it's ugly?  As long as the log_start/log_stop callbacks
are handled properly, I think it's okay.

I find the "Refresh DIRTY_LOG_MIGRATION bit." part uglier. :)

Paolo

Reply via email to