[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 10/32] memory: Set DIRTY_MEMORY_MIGRATION when IOMMU is enabled
From: |
Alex Williamson |
Subject: |
[PULL 10/32] memory: Set DIRTY_MEMORY_MIGRATION when IOMMU is enabled |
Date: |
Mon, 26 Oct 2020 13:33:52 -0600 |
User-agent: |
StGit/0.21-dirty |
From: Kirti Wankhede <kwankhede@nvidia.com>
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>
---
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;
- [PULL 00/32] VFIO updates 2020-10-26 (for QEMU 5.2 soft-freeze), Alex Williamson, 2020/10/26
- [PULL 01/32] vfio: Add function to unmap VFIO region, Alex Williamson, 2020/10/26
- [PULL 02/32] vfio: Add vfio_get_object callback to VFIODeviceOps, Alex Williamson, 2020/10/26
- [PULL 03/32] vfio: Add save and load functions for VFIO PCI devices, Alex Williamson, 2020/10/26
- [PULL 04/32] vfio: Add migration region initialization and finalize function, Alex Williamson, 2020/10/26
- [PULL 05/32] vfio: Add VM state change handler to know state of VM, Alex Williamson, 2020/10/26
- [PULL 06/32] vfio: Add migration state change notifier, Alex Williamson, 2020/10/26
- [PULL 07/32] vfio: Register SaveVMHandlers for VFIO device, Alex Williamson, 2020/10/26
- [PULL 09/32] vfio: Add load state functions to SaveVMHandlers, Alex Williamson, 2020/10/26
- [PULL 08/32] vfio: Add save state functions to SaveVMHandlers, Alex Williamson, 2020/10/26
- [PULL 10/32] memory: Set DIRTY_MEMORY_MIGRATION when IOMMU is enabled,
Alex Williamson <=
- [PULL 11/32] vfio: Get migration capability flags for container, Alex Williamson, 2020/10/26
- [PULL 12/32] vfio: Add function to start and stop dirty pages tracking, Alex Williamson, 2020/10/26
- [PULL 13/32] vfio: Add vfio_listener_log_sync to mark dirty pages, Alex Williamson, 2020/10/26
- [PULL 14/32] vfio: Dirty page tracking when vIOMMU is enabled, Alex Williamson, 2020/10/26
- [PULL 15/32] vfio: Add ioctl to get dirty pages bitmap during dma unmap, Alex Williamson, 2020/10/26
- [PULL 16/32] vfio: Make vfio-pci device migration capable, Alex Williamson, 2020/10/26
- [PULL 17/32] qapi: Add VFIO devices migration stats in Migration stats, Alex Williamson, 2020/10/26
- [PULL 19/32] linux-headers: update against 5.10-rc1, Alex Williamson, 2020/10/26
- [PULL 18/32] update-linux-headers: Add vfio_zdev.h, Alex Williamson, 2020/10/26
- [PULL 20/32] s390x/pci: Move header files to include/hw/s390x, Alex Williamson, 2020/10/26