aboutsummaryrefslogtreecommitdiff
path: root/softmmu
diff options
context:
space:
mode:
authorKirti Wankhede <kwankhede@nvidia.com>2020-10-26 15:06:20 +0530
committerAlex Williamson <alex.williamson@redhat.com>2020-11-01 12:30:50 -0700
commit74ee653799f93dfb119de9a248bdf0a85a68904f (patch)
tree03d1d5d0d8b88de305d5afdce6116fb840d311f9 /softmmu
parent3336d21710130a3d64c901aeae2dc66c364f93ad (diff)
downloadqemu-74ee653799f93dfb119de9a248bdf0a85a68904f.zip
qemu-74ee653799f93dfb119de9a248bdf0a85a68904f.tar.gz
qemu-74ee653799f93dfb119de9a248bdf0a85a68904f.tar.bz2
memory: Set DIRTY_MEMORY_MIGRATION when IOMMU is enabled
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 <kwankhede@nvidia.com> Reviewed-by: Yan Zhao <yan.y.zhao@intel.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'softmmu')
-rw-r--r--softmmu/memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/softmmu/memory.c b/softmmu/memory.c
index ee4a6bc..21d533d 100644
--- a/softmmu/memory.c
+++ b/softmmu/memory.c
@@ -1806,7 +1806,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;