[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v28 10/17] memory: Set DIRTY_MEMORY_MIGRATION when IOMMU is enabl
From: |
Kirti Wankhede |
Subject: |
[PATCH v28 10/17] memory: Set DIRTY_MEMORY_MIGRATION when IOMMU is enabled |
Date: |
Fri, 23 Oct 2020 16:10:36 +0530 |
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>
---
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
- Re: [PATCH v28 05/17] vfio: Add VM state change handler to know state of VM, (continued)
- [PATCH v28 06/17] vfio: Add migration state change notifier, Kirti Wankhede, 2020/10/23
- [PATCH v28 07/17] vfio: Register SaveVMHandlers for VFIO device, Kirti Wankhede, 2020/10/23
- [PATCH v28 08/17] vfio: Add save state functions to SaveVMHandlers, Kirti Wankhede, 2020/10/23
- [PATCH v28 09/17] vfio: Add load state functions to SaveVMHandlers, Kirti Wankhede, 2020/10/23
- [PATCH v28 10/17] memory: Set DIRTY_MEMORY_MIGRATION when IOMMU is enabled,
Kirti Wankhede <=
- [PATCH v28 11/17] vfio: Get migration capability flags for container, Kirti Wankhede, 2020/10/23
- [PATCH v28 12/17] vfio: Add function to start and stop dirty pages tracking, Kirti Wankhede, 2020/10/23
- [PATCH v28 13/17] vfio: Add vfio_listener_log_sync to mark dirty pages, Kirti Wankhede, 2020/10/23
- [PATCH v28 14/17] vfio: Dirty page tracking when vIOMMU is enabled, Kirti Wankhede, 2020/10/23
- [PATCH v28 15/17] vfio: Add ioctl to get dirty pages bitmap during dma unmap, Kirti Wankhede, 2020/10/23
- [PATCH v28 16/17] vfio: Make vfio-pci device migration capable, Kirti Wankhede, 2020/10/23
- [PATCH v28 17/17] qapi: Add VFIO devices migration stats in Migration stats, Kirti Wankhede, 2020/10/23
- Re: [PATCH v28 00/17] Add migration support for VFIO devices, Philippe Mathieu-Daudé, 2020/10/24