Reviewed-by: Yan Zhao <yan.y.z...@intel.com> On Fri, Oct 23, 2020 at 04:10:36PM +0530, Kirti Wankhede wrote: > mr->ram_block is NULL when mr->is_iommu is true, then fr.dirty_log_mask > wasn't set correctly due to which memory listener's log_sync doesn't > get called. > This patch returns log_mask with DIRTY_MEMORY_MIGRATION set when > IOMMU is enabled. > > Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> > --- > softmmu/memory.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/softmmu/memory.c b/softmmu/memory.c > index 403ff3abc99b..94f606e9d9d9 100644 > --- a/softmmu/memory.c > +++ b/softmmu/memory.c > @@ -1792,7 +1792,7 @@ bool memory_region_is_ram_device(MemoryRegion *mr) > uint8_t memory_region_get_dirty_log_mask(MemoryRegion *mr) > { > uint8_t mask = mr->dirty_log_mask; > - if (global_dirty_log && mr->ram_block) { > + if (global_dirty_log && (mr->ram_block || memory_region_is_iommu(mr))) { > mask |= (1 << DIRTY_MEMORY_MIGRATION); > } > return mask; > -- > 2.7.0 >
- [PATCH v28 00/17] Add migration support for VFIO devices Kirti Wankhede
- [PATCH v28 02/17] vfio: Add vfio_get_object callback ... Kirti Wankhede
- [PATCH v28 05/17] vfio: Add VM state change handler t... Kirti Wankhede
- Re: [PATCH v28 05/17] vfio: Add VM state change h... Cornelia Huck
- Re: [PATCH v28 05/17] vfio: Add VM state chan... Kirti Wankhede
- [PATCH v28 10/17] memory: Set DIRTY_MEMORY_MIGRATION ... Kirti Wankhede
- Re: [PATCH v28 10/17] memory: Set DIRTY_MEMORY_MI... Yan Zhao
- [PATCH v28 01/17] vfio: Add function to unmap VFIO re... Kirti Wankhede
- [PATCH v28 03/17] vfio: Add save and load functions f... Kirti Wankhede
- Re: [PATCH v28 03/17] vfio: Add save and load fun... Yan Zhao
- Re: [PATCH v28 03/17] vfio: Add save and load... Alex Williamson
- Re: [PATCH v28 03/17] vfio: Add save and ... Kirti Wankhede
- Re: [PATCH v28 03/17] vfio: Add save... Alex Williamson
- Re: [PATCH v28 03/17] vfio: Add save and ... Yan Zhao
- [PATCH v28 04/17] vfio: Add migration region initiali... Kirti Wankhede
- Re: [PATCH v28 04/17] vfio: Add migration region ... Cornelia Huck
- Re: [PATCH v28 04/17] vfio: Add migration reg... Kirti Wankhede