ty page bitmap until bitmap for all requested pages
are copied.
Thanks,
Kirti
Kirti Wankhede (17):
vfio: Add function to unmap VFIO region
vfio: Add vfio_get_object callback to VFIODeviceOps
vfio: Add save and load functions for VFIO PCI devices
vfio: Add migration region initializatio
data_size before moving to next steps.
Includes
Fix Reported-by: Zhi Wang
https://www.mail-archive.com/qemu-devel@nongnu.org/msg743722.htm
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
---
hw/vfio/migration.c | 276 ++
hw/vfio/tra
Hook vfio_get_object callback for PCI devices.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Suggested-by: Cornelia Huck
Reviewed-by: Cornelia Huck
---
hw/vfio/pci.c | 8
include/hw/vfio/vfio-common.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/hw/vfio
Added migration state change notifier to get notification on migration state
change. These states are translated to VFIO device state and conveyed to
vendor driver.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Dr. David Alan Gilbert
---
hw/vfio/migration.c | 37
This function will be used for migration region.
Migration region is mmaped when migration starts and will be unmapped when
migration is complete.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Cornelia Huck
---
hw/vfio/common.c | 32
turn 1;
+ }
}
data_size = vfio_save_buffer(f, vbasedev);
-Original Message-
From: Kirti Wankhede
Sent: Wednesday, September 23, 2020 2:24 AM
To: alex.william...@redhat.com; c...@nvidia.com
Cc: Tian, Kevin ; Yang, Ziye ; Liu, Changpeng
; Liu, Yi L ; mlevi...@redhat.com; eskul...@redh
On 10/20/2020 4:21 PM, Cornelia Huck wrote:
On Sun, 18 Oct 2020 01:54:56 +0530
Kirti Wankhede wrote:
On 9/29/2020 4:33 PM, Dr. David Alan Gilbert wrote:
* Cornelia Huck (coh...@redhat.com) wrote:
On Wed, 23 Sep 2020 04:54:07 +0530
Kirti Wankhede wrote:
VM state change handler gets
On 10/19/2020 10:54 PM, Alex Williamson wrote:
On Mon, 19 Oct 2020 11:31:03 +0530
Kirti Wankhede wrote:
On 9/26/2020 3:53 AM, Alex Williamson wrote:
On Wed, 23 Sep 2020 04:54:15 +0530
Kirti Wankhede wrote:
Create mapped iova list when vIOMMU is enabled. For each mapped iova
save
On 9/26/2020 3:53 AM, Alex Williamson wrote:
On Wed, 23 Sep 2020 04:54:15 +0530
Kirti Wankhede wrote:
Create mapped iova list when vIOMMU is enabled. For each mapped iova
save translated address. Add node to list on MAP and remove node from
list on UNMAP.
This list is used to track dirty
On 9/25/2020 5:23 PM, Cornelia Huck wrote:
On Wed, 23 Sep 2020 04:54:09 +0530
Kirti Wankhede wrote:
Define flags to be used as delimeter in migration file stream.
Added .save_setup and .save_cleanup functions. Mapped & unmapped migration
region from these functions at source during sa
On 9/26/2020 3:25 AM, Alex Williamson wrote:
On Wed, 23 Sep 2020 04:54:14 +0530
Kirti Wankhede wrote:
Call VFIO_IOMMU_DIRTY_PAGES ioctl to start and stop dirty pages tracking
for VFIO devices.
Signed-off-by: Kirti Wankhede
Reviewed-by: Dr. David Alan Gilbert
---
hw/vfio/migration.c
On 10/1/2020 3:37 PM, Cornelia Huck wrote:
On Wed, 23 Sep 2020 04:54:11 +0530
Kirti Wankhede wrote:
Sequence during _RESUMING device state:
While data for this device is available, repeat below steps:
a. read data_offset from where user application should write data.
b. write data
On 9/26/2020 2:32 AM, Alex Williamson wrote:
On Wed, 23 Sep 2020 04:54:10 +0530
Kirti Wankhede wrote:
Added .save_live_pending, .save_live_iterate and .save_live_complete_precopy
functions. These functions handles pre-copy and stop-and-copy phase.
In _SAVING|_RUNNING device state or pre
+vfio_migration_set_state(char *name, uint32_t state) " (%s) state %d"
+vfio_vmstate_change(char *name, int running, const char *reason, uint32_t dev_state)
" (%s) running %d reason %s device state %d"
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
index
On 9/26/2020 1:50 AM, Alex Williamson wrote:
On Wed, 23 Sep 2020 04:54:09 +0530
Kirti Wankhede wrote:
Define flags to be used as delimeter in migration file stream.
Added .save_setup and .save_cleanup functions. Mapped & unmapped migration
region from these functions at source du
On 9/29/2020 3:49 PM, Dr. David Alan Gilbert wrote:
* Philippe Mathieu-Daudé (phi...@redhat.com) wrote:
On 9/23/20 1:24 AM, Kirti Wankhede wrote:
Define flags to be used as delimeter in migration file stream.
Typo "delimiter".
Added .save_setup and .save_cleanup functio
On 9/26/2020 1:50 AM, Alex Williamson wrote:
On Wed, 23 Sep 2020 04:54:08 +0530
Kirti Wankhede wrote:
Added migration state change notifier to get notification on migration state
change. These states are translated to VFIO device state and conveyed to vendor
driver.
Signed-off-by: Kirti
On 9/26/2020 1:50 AM, Alex Williamson wrote:
On Wed, 23 Sep 2020 04:54:07 +0530
Kirti Wankhede wrote:
VM state change handler gets called on change in VM's state. This is used to set
VFIO device state to _RUNNING.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Dr. David
On 9/29/2020 4:33 PM, Dr. David Alan Gilbert wrote:
* Cornelia Huck (coh...@redhat.com) wrote:
On Wed, 23 Sep 2020 04:54:07 +0530
Kirti Wankhede wrote:
VM state change handler gets called on change in VM's state. This is used to set
VFIO device state to _RUNNING.
Signed-off-by: Kirti
On 9/26/2020 1:50 AM, Alex Williamson wrote:
On Wed, 23 Sep 2020 04:54:06 +0530
Kirti Wankhede wrote:
Whether the VFIO device supports migration or not is decided based of
migration region query. If migration region query is successful and migration
region initialization is successful
On 9/24/2020 7:38 PM, Cornelia Huck wrote:
On Wed, 23 Sep 2020 04:54:06 +0530
Kirti Wankhede wrote:
Whether the VFIO device supports migration or not is decided based of
migration region query. If migration region query is successful and migration
region initialization is successful
structure and use
migration blocker from generic structure of VFIO device.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Dr. David Alan Gilbert
---
hw/vfio/pci.c | 28
hw/vfio/pci.h | 1 -
2 files changed, 8 insertions(+), 21 deletions(-)
diff
-by: Kirti Wankhede
Reviewed-by: Neo Jia
---
Note: Comments from v25 for this patch are not addressed in this series.
https://www.mail-archive.com/qemu-devel@nongnu.org/msg714646.html
Need to investigate more on the points raised in previous version.
hw/vfio/common.c | 90
vfio_listener_log_sync gets list of dirty pages from container using
VFIO_IOMMU_GET_DIRTY_BITMAP ioctl and mark those pages dirty when all
devices are stopped and saving state.
Return early for the RAM block section of mapped MMIO region.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Create mapped iova list when vIOMMU is enabled. For each mapped iova
save translated address. Add node to list on MAP and remove node from
list on UNMAP.
This list is used to track dirty pages during migration.
Signed-off-by: Kirti Wankhede
---
hw/vfio/common.c | 58
Call VFIO_IOMMU_DIRTY_PAGES ioctl to start and stop dirty pages tracking
for VFIO devices.
Signed-off-by: Kirti Wankhede
Reviewed-by: Dr. David Alan Gilbert
---
hw/vfio/migration.c | 36
1 file changed, 36 insertions(+)
diff --git a/hw/vfio/migration.c b
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
---
softmmu/memory
data_size before moving to next steps.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
---
hw/vfio/migration.c | 273 ++
hw/vfio/trace-events | 6 +
include/hw/vfio/vfio-common.h | 1 +
3 files changed, 280 insertions(+)
diff --git
is written in
staging buffer.
For user, data is opaque. User should write data in the same order as
received.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Dr. David Alan Gilbert
---
hw/vfio/migration.c | 170 +++
hw/vfio/trace
if IOMMU module doesn't support migration
capability.
Signed-off-by: Kirti Wankhede
Cc: Shameer Kolothum
Cc: Eric Auger
---
hw/vfio/common.c | 90 +++
hw/vfio/migration.c | 7 +++-
include/hw/vfio/vfio-common.h | 3 ++
3 files
Added amount of bytes transferred to the target VM by all VFIO devices
Signed-off-by: Kirti Wankhede
---
Note: Comments from v25 for this patch are not addressed yet.
https://www.mail-archive.com/qemu-devel@nongnu.org/msg715620.html
Alex, need more pointer on documentation part raised Markus
Added migration state change notifier to get notification on migration state
change. These states are translated to VFIO device state and conveyed to vendor
driver.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Dr. David Alan Gilbert
---
hw/vfio/migration.c | 29
VM state change handler gets called on change in VM's state. This is used to set
VFIO device state to _RUNNING.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Dr. David Alan Gilbert
---
hw/vfio/migration.c | 136 ++
hw/vfio
Whether the VFIO device supports migration or not is decided based of
migration region query. If migration region query is successful and migration
region initialization is successful then migration is supported else
migration is blocked.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Acked
Hook vfio_get_object callback for PCI devices.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Suggested-by: Cornelia Huck
Reviewed-by: Cornelia Huck
---
hw/vfio/pci.c | 8
include/hw/vfio/vfio-common.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/hw/vfio
when .save_setup is called, _SAVING | _RUNNING state is set for VFIO
device. During save-restore, VM is paused, _SAVING state is set for VFIO device.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
---
hw/vfio/migration.c | 91
hw/vfio/t
These functions save and restore PCI device specific data - config
space of PCI device.
Used VMStateDescription to save and restore interrupt state.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
---
hw/vfio/pci.c | 134 ++
hw/vfio
This function will be used for migration region.
Migration region is mmaped when migration starts and will be unmapped when
migration is complete.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Cornelia Huck
---
hw/vfio/common.c | 32
Replaced ioctl with read/write for trapped part of migration region.
- Added both type of access support, trapped or mmapped, for data section of the
region.
- Moved PCI device functions to pci file.
- Added iteration to get dirty page bitmap until bitmap for all requested pages
are copied.
T
On 6/25/2020 12:26 AM, Alex Williamson wrote:
On Sun, 21 Jun 2020 01:51:24 +0530
Kirti Wankhede wrote:
With vIOMMU, IO virtual address range can get unmapped while in pre-copy
phase of migration. In that case, unmap ioctl should return pages pinned
in that range and QEMU should find its
On 6/25/2020 12:25 AM, Alex Williamson wrote:
On Sun, 21 Jun 2020 01:51:23 +0530
Kirti Wankhede wrote:
vfio_listener_log_sync gets list of dirty pages from container using
VFIO_IOMMU_GET_DIRTY_BITMAP ioctl and mark those pages dirty when all
devices are stopped and saving state.
Return
On 6/25/2020 12:25 AM, Alex Williamson wrote:
On Sun, 21 Jun 2020 01:51:22 +0530
Kirti Wankhede wrote:
Create mapped iova list when vIOMMU is enabled. For each mapped iova
save translated address. Add node to list on MAP and remove node from
list on UNMAP.
This list is used to track dirty
On 6/25/2020 12:24 AM, Alex Williamson wrote:
On Sun, 21 Jun 2020 01:51:18 +0530
Kirti Wankhede wrote:
Sequence during _RESUMING device state:
While data for this device is available, repeat below steps:
a. read data_offset from where user application should write data.
b. write data
On 6/25/2020 12:25 AM, Alex Williamson wrote:
On Sun, 21 Jun 2020 01:51:20 +0530
Kirti Wankhede wrote:
Added helper functions to get IOMMU info capability chain.
Added function to get migration capability information from that
capability chain for IOMMU container.
Similar change
On 6/23/2020 1:58 AM, Alex Williamson wrote:
On Sun, 21 Jun 2020 01:51:12 +0530
Kirti Wankhede wrote:
These functions save and restore PCI device specific data - config
space of PCI device.
Tested save and restore with MSI and MSIX type.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
answers :)
Kirti Wankhede writes:
Added amount of bytes transferred to the target VM by all VFIO devices
Signed-off-by: Kirti Wankhede
[...]
diff --git a/qapi/migration.json b/qapi/migration.json
index d5000558c6c9..952864b05455 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
On 6/23/2020 4:20 AM, Alex Williamson wrote:
On Sun, 21 Jun 2020 01:51:17 +0530
Kirti Wankhede wrote:
Added .save_live_pending, .save_live_iterate and .save_live_complete_precopy
functions. These functions handles pre-copy and stop-and-copy phase.
In _SAVING|_RUNNING device state or pre
On 6/23/2020 4:20 AM, Alex Williamson wrote:
On Sun, 21 Jun 2020 01:51:16 +0530
Kirti Wankhede wrote:
Define flags to be used as delimeter in migration file stream.
Added .save_setup and .save_cleanup functions. Mapped & unmapped migration
region from these functions at source du
On 6/23/2020 4:20 AM, Alex Williamson wrote:
On Sun, 21 Jun 2020 01:51:14 +0530
Kirti Wankhede wrote:
VM state change handler gets called on change in VM's state. This is used to set
VFIO device state to _RUNNING.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Dr. David
-by: Kirti Wankhede
Reviewed-by: Neo Jia
---
hw/vfio/common.c | 85 +---
1 file changed, 81 insertions(+), 4 deletions(-)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 0518cf228ed5..a06b8f2f66e2 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio
Create mapped iova list when vIOMMU is enabled. For each mapped iova
save translated address. Add node to list on MAP and remove node from
list on UNMAP.
This list is used to track dirty pages during migration.
Signed-off-by: Kirti Wankhede
---
hw/vfio/common.c | 58
and use
migration blocker from generic structure of VFIO device.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Dr. David Alan Gilbert
---
hw/vfio/pci.c | 32 +++-
hw/vfio/pci.h | 1 -
2 files changed, 11 insertions(+), 22 deletions(-)
diff --git
Added helper functions to get IOMMU info capability chain.
Added function to get migration capability information from that
capability chain for IOMMU container.
Similar change was proposed earlier:
https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg03759.html
Signed-off-by: Kirti Wankhede
Added amount of bytes transferred to the target VM by all VFIO devices
Signed-off-by: Kirti Wankhede
---
hw/vfio/common.c| 20
hw/vfio/migration.c | 11 ++-
include/qemu/vfio-helpers.h | 3 +++
migration/migration.c | 14
vfio_listener_log_sync gets list of dirty pages from container using
VFIO_IOMMU_GET_DIRTY_BITMAP ioctl and mark those pages dirty when all
devices are stopped and saving state.
Return early for the RAM block section of mapped MMIO region.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
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
---
memory.c | 2 +-
Call VFIO_IOMMU_DIRTY_PAGES ioctl to start and stop dirty pages tracking
for VFIO devices.
Signed-off-by: Kirti Wankhede
Reviewed-by: Dr. David Alan Gilbert
---
hw/vfio/migration.c | 36
1 file changed, 36 insertions(+)
diff --git a/hw/vfio/migration.c b
Added migration state change notifier to get notification on migration state
change. These states are translated to VFIO device state and conveyed to vendor
driver.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Dr. David Alan Gilbert
---
hw/vfio/migration.c | 29
VM state change handler gets called on change in VM's state. This is used to set
VFIO device state to _RUNNING.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Dr. David Alan Gilbert
---
hw/vfio/migration.c | 87 +++
hw/vfio
is written in
staging buffer.
For user, data is opaque. User should write data in the same order as
received.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Dr. David Alan Gilbert
---
hw/vfio/migration.c | 177 +++
hw/vfio/trace
data_size before moving to next steps.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
---
hw/vfio/migration.c | 283 ++
hw/vfio/trace-events | 6 +
include/hw/vfio/vfio-common.h | 1 +
3 files changed, 290 insertions(+)
diff --git
Whether the VFIO device supports migration or not is decided based of
migration region query. If migration region query is successful and migration
region initialization is successful then migration is supported else
migration is blocked.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Acked
when .save_setup is called, _SAVING | _RUNNING state is set for VFIO
device. During save-restore, VM is paused, _SAVING state is set for VFIO device.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
---
hw/vfio/migration.c | 92
hw/vfio/t
These functions save and restore PCI device specific data - config
space of PCI device.
Tested save and restore with MSI and MSIX type.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
---
hw/vfio/pci.c | 95 +++
include/hw/vfio/vfio
This function will be used for migration region.
Migration region is mmaped when migration starts and will be unmapped when
migration is complete.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Cornelia Huck
---
hw/vfio/common.c | 32
tion region.
- Replaced ioctl with read/write for trapped part of migration region.
- Added both type of access support, trapped or mmapped, for data section of the
region.
- Moved PCI device functions to pci file.
- Added iteration to get dirty page bitmap until bitmap for all requested pages
Hook vfio_get_object callback for PCI devices.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Suggested-by: Cornelia Huck
Reviewed-by: Cornelia Huck
---
hw/vfio/pci.c | 8
include/hw/vfio/vfio-common.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/hw/vfio
Fixes sparse warnings by adding '__user' in typecast for
copy_[from,to]_user()
Fixes: d6a4c185660c (vfio iommu: Implementation of ioctl for dirty pages
tracking)
Signed-off-by: Kirti Wankhede
Reported-by: kbuild test robot
---
drivers/vfio/vfio_iommu_type1.c | 4 ++--
1 file changed, 2
pages
tracking)
Signed-off-by: Kirti Wankhede
Reported-by: kbuild test robot
---
drivers/vfio/vfio_iommu_type1.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c
index 97a29bc04d5d..9d9c8709a24c 100644
--- a/driver
with the smallest supported page size. Update bitmap from
pinning functions when tracking is enabled. When user application queries
bitmap, check if requested page size is same as page size used to
populated bitmap. If it is equal, copy bitmap, but if not equal, return
error.
Signed-off-by: Kirti Wankhede
On 5/29/2020 4:29 AM, Alex Williamson wrote:
On Wed, 27 May 2020 09:48:22 +0100
"Dr. David Alan Gilbert" wrote:
* Yan Zhao (yan.y.z...@intel.com) wrote:
BTW, for viommu, the downtime data is as below. under the same network
condition and guest memory size, and no running dirty data/memory
VFIO_DMA_UNMAP_FLAG_GET_DIRTY_BITMAP.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Cornelia Huck
Reviewed-by: Yan Zhao
---
drivers/vfio/vfio_iommu_type1.c | 61 +
include/uapi/linux/vfio.h | 11
2 files changed, 61 insertions(+), 11 deletions
all of the vfio_groups for each
vfio_domain in the domain_list dirty page scope is limited to pinned
pages. This flag is updated on first pinned pages request for that IOMMU
group and on attaching/detaching group.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Yan Zhao
---
drivers/vfio/vfi
vfio_pfn.ref_count is always updated while holding iommu->lock, using
atomic variable is overkill.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Eric Auger
Reviewed-by: Cornelia Huck
Reviewed-by: Yan Zhao
---
drivers/vfio/vfio_iommu_type1.c | 9 +
1 file changed
with the smallest supported page size. Update bitmap from
pinning functions when tracking is enabled. When user application queries
bitmap, check if requested page size is same as page size used to
populated bitmap. If it is equal, copy bitmap, but if not equal, return
error.
Signed-off-by: Kirti Wankhede
transition details.
- Defined sequence to be followed while saving and resuming VFIO device.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Cornelia Huck
Reviewed-by: Yan Zhao
---
include/uapi/linux/vfio.h | 228 ++
1 file changed
Calculate and cache pgsize_bitmap when iommu->domain_list is updated
and iommu->external_domain is set for mdev device.
Add iommu->lock protection when cached pgsize_bitmap is accessed.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Cornelia Huck
Reviewed-by:
for ioctls used to get
dirty bitmap.
Signed-off-by: Kirti Wankhede
Reviewed-by: Cornelia Huck
Reviewed-by: Yan Zhao
---
drivers/vfio/vfio_iommu_type1.c | 23 ++-
include/uapi/linux/vfio.h | 23 +++
2 files changed, 45 insertions(+), 1 deletion
support to start/stop dirtied pages tracking and to get bitmap of all
dirtied pages for requested IO virtual address range.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Reviewed-by: Cornelia Huck
Reviewed-by: Yan Zhao
---
include/uapi/linux/vfio.h | 57
igration region.
- Added both type of access support, trapped or mmapped, for data section
of the region.
- Moved PCI device functions to pci file.
- Added iteration to get dirty page bitmap until bitmap for all requested
pages are copied.
Thanks,
Kirti
Kirti Wankhede (8):
vfio: UAPI
On 5/28/2020 10:17 AM, Yan Zhao wrote:
The whole series works for us in general:
Reviewed-by: Yan Zhao
Thanks.
Kirti
On Wed, May 20, 2020 at 11:38:00PM +0530, Kirti Wankhede wrote:
Hi,
This patch set adds:
* IOCTL VFIO_IOMMU_DIRTY_PAGES to get dirty pages bitmap
On 5/25/2020 12:29 PM, Yan Zhao wrote:
On Tue, May 19, 2020 at 10:58:04AM -0600, Alex Williamson wrote:
Hi folks,
My impression is that we're getting pretty close to a workable
implementation here with v22 plus respins of patches 5, 6, and 8. We
also have a matching QEMU series and a
On 5/21/2020 7:48 PM, Dr. David Alan Gilbert wrote:
* Kirti Wankhede (kwankh...@nvidia.com) wrote:
Define flags to be used as delimeter in migration file stream.
Added .save_setup and .save_cleanup functions. Mapped & unmapped migration
region from these functions at source during sa
On 5/21/2020 3:20 PM, Dr. David Alan Gilbert wrote:
* Kirti Wankhede (kwankh...@nvidia.com) wrote:
These functions save and restore PCI device specific data - config
space of PCI device.
Tested save and restore with MSI and MSIX type.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
On 5/21/2020 12:34 PM, Yan Zhao wrote:
On Thu, May 21, 2020 at 12:39:48PM +0530, Kirti Wankhede wrote:
On 5/21/2020 10:38 AM, Yan Zhao wrote:
On Wed, May 20, 2020 at 10:46:12AM -0600, Alex Williamson wrote:
On Wed, 20 May 2020 19:10:07 +0530
Kirti Wankhede wrote:
On 5/20/2020 8:25 AM
On 5/21/2020 12:34 PM, Yan Zhao wrote:
On Thu, May 21, 2020 at 12:39:48PM +0530, Kirti Wankhede wrote:
On 5/21/2020 10:38 AM, Yan Zhao wrote:
On Wed, May 20, 2020 at 10:46:12AM -0600, Alex Williamson wrote:
On Wed, 20 May 2020 19:10:07 +0530
Kirti Wankhede wrote:
On 5/20/2020 8:25 AM
On 5/21/2020 10:38 AM, Yan Zhao wrote:
On Wed, May 20, 2020 at 10:46:12AM -0600, Alex Williamson wrote:
On Wed, 20 May 2020 19:10:07 +0530
Kirti Wankhede wrote:
On 5/20/2020 8:25 AM, Yan Zhao wrote:
On Tue, May 19, 2020 at 10:58:04AM -0600, Alex Williamson wrote:
Hi folks,
My
and use
migration blocker from generic structure of VFIO device.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
---
hw/vfio/pci.c | 32 +++-
hw/vfio/pci.h | 1 -
2 files changed, 11 insertions(+), 22 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index
Call VFIO_IOMMU_DIRTY_PAGES ioctl to start and stop dirty pages tracking
for VFIO devices.
Signed-off-by: Kirti Wankhede
---
hw/vfio/migration.c | 36
1 file changed, 36 insertions(+)
diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
index b9bbe38e539c
Added helper functions to get IOMMU info capability chain.
Added function to get migration capability information from that
capability chain for IOMMU container.
Similar change was proposed earlier:
https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg03759.html
Signed-off-by: Kirti Wankhede
-by: Kirti Wankhede
Reviewed-by: Neo Jia
---
hw/vfio/common.c | 84 +---
1 file changed, 80 insertions(+), 4 deletions(-)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 3f7049fbd1b0..2dd9e8b24788 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio
Added amount of bytes transferred to the target VM by all VFIO devices
Signed-off-by: Kirti Wankhede
---
hw/vfio/common.c| 20
hw/vfio/migration.c | 10 +-
include/qemu/vfio-helpers.h | 3 +++
migration/migration.c | 18
Signed-off-by: Kirti Wankhede
---
memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/memory.c b/memory.c
index a6c69e1391ba..27f22f1a9974 100644
--- a/memory.c
+++ b/memory.c
@@ -1788,7 +1788,7 @@ bool memory_region_is_ram_device(MemoryRegion *mr)
uint8_t
vfio_listener_log_sync gets list of dirty pages from container using
VFIO_IOMMU_GET_DIRTY_BITMAP ioctl and mark those pages dirty when all
devices are stopped and saving state.
Return early for the RAM block section of mapped MMIO region.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
Added migration state change notifier to get notification on migration state
change. These states are translated to VFIO device state and conveyed to vendor
driver.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
---
hw/vfio/migration.c | 30 ++
hw/vfio
is written in
staging buffer.
For user, data is opaque. User should write data in the same order as
received.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
---
hw/vfio/migration.c | 180 +++
hw/vfio/trace-events | 3 +
2 files changed, 183
Add optional method to get address limit IOMMU supports
Signed-off-by: Kirti Wankhede
---
hw/i386/intel_iommu.c | 9 +
include/exec/memory.h | 18 ++
memory.c | 11 +++
3 files changed, 38 insertions(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386
when .save_setup is called, _SAVING | _RUNNING state is set for VFIO
device. During save-restore, VM is paused, _SAVING state is set for VFIO device.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
---
hw/vfio/migration.c | 73
hw/vfio/t
VM state change handler gets called on change in VM's state. This is used to set
VFIO device state to _RUNNING.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
---
hw/vfio/migration.c | 87 +++
hw/vfio/trace-events | 2 +
include
data_size before moving to next steps.
Signed-off-by: Kirti Wankhede
Reviewed-by: Neo Jia
---
hw/vfio/migration.c | 254 +-
hw/vfio/trace-events | 6 +
include/hw/vfio/vfio-common.h | 1 +
3 files changed, 260 insertions(+), 1 deletion
101 - 200 of 982 matches
Mail list logo