[Qemu-devel] [PATCH v5 04/13] vfio: Add save and load functions for VFIO PCI devices

2019-07-08 Thread Kirti Wankhede
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 | 114 ++ include/hw/vfio/vfio

[Qemu-devel] [PATCH v5 03/13] vfio: Add vfio_get_object callback to VFIODeviceOps

2019-07-08 Thread Kirti Wankhede
Hook vfio_get_object callback for PCI devices. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia Suggested-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/pci.c b/hw/vfio/pci.c index

[Qemu-devel] [PATCH v5 09/13] vfio: Add save state functions to SaveVMHandlers

2019-07-08 Thread Kirti Wankhede
ere to serial migration buffer read operation. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/migration.c | 246 +++ hw/vfio/trace-events | 6 ++ 2 files changed, 252 insertions(+) diff --git a/hw/vfio/migration.c b/hw/vfio/migr

[Qemu-devel] [PATCH v5 11/13] vfio: Add function to get dirty page list

2019-07-08 Thread Kirti Wankhede
itmap from the region or mmaped part of the region. - Iterate above steps till page bitmap for all requested pfns are copied. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/migration.c | 123 ++ hw/vfio/trace-events

[Qemu-devel] [PATCH v5 06/13] vfio: Add VM state change handler to know state of VM

2019-07-08 Thread Kirti Wankhede
mutex that is used to serialize operations on migration data region during saving state. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/migration.c | 64 +++ hw/vfio/trace-events | 2 ++ include/hw/vfio/vfio-common.h | 4 +

[Qemu-devel] [PATCH v5 12/13] vfio: Add vfio_listerner_log_sync to mark dirty pages

2019-07-08 Thread Kirti Wankhede
vfio_listerner_log_sync gets list of dirty pages from vendor driver and mark those pages dirty when in _SAVING state. Return early for the RAM block section of mapped MMIO region. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/common.c | 35

[Qemu-devel] [PATCH v5 05/13] vfio: Add migration region initialization and finalize function

2019-07-08 Thread Kirti Wankhede
supported else migration is blocked. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/Makefile.objs | 2 +- hw/vfio/migration.c | 145 ++ hw/vfio/trace-events | 3 + include/hw/vfio/vfio-common.h | 14 4 files

[Qemu-devel] [PATCH v5 07/13] vfio: Add migration state change notifier

2019-07-08 Thread Kirti Wankhede
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 | 54

[Qemu-devel] [PATCH v5 13/13] vfio: Make vfio-pci device migration capable.

2019-07-08 Thread Kirti Wankhede
Call vfio_migration_probe() and vfio_migration_finalize() functions for vfio-pci device to enable migration for vfio PCI device. Removed vfio_pci_vmstate structure. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/pci.c | 15 +-- 1 file changed, 9 insertions(+), 6

[Qemu-devel] [PATCH v5 10/13] vfio: Add load state functions to SaveVMHandlers

2019-07-08 Thread Kirti Wankhede
. - Repeat above until VFIO_MIG_FLAG_END_OF_STATE. - Unmap migration region. 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 | 162 +++ hw

[Qemu-devel] [PATCH v6 00/13] Add migration support for VFIO device

2019-07-08 Thread Kirti Wankhede
r 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 (13): vfio: KABI for migration interface vfio: Add function to unmap VFIO region vfio: Ad

[Qemu-devel] [PATCH v6 01/13] vfio: KABI for migration interface

2019-07-08 Thread Kirti Wankhede
is page aligned. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- linux-headers/linux/vfio.h | 166 + 1 file changed, 166 insertions(+) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index 24f505199f83..6696a4600545 100644

[Qemu-devel] [PATCH v6 11/13] vfio: Add function to get dirty page list

2019-07-08 Thread Kirti Wankhede
itmap from the region or mmaped part of the region. - Iterate above steps till page bitmap for all requested pfns are copied. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/migration.c | 123 ++ hw/vfio/trace-events

[Qemu-devel] [PATCH v6 09/13] vfio: Add save state functions to SaveVMHandlers

2019-07-08 Thread Kirti Wankhede
ere to serial migration buffer read operation. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/migration.c | 246 +++ hw/vfio/trace-events | 6 ++ 2 files changed, 252 insertions(+) diff --git a/hw/vfio/migration.c b/hw/vfio/migr

[Qemu-devel] [PATCH v6 04/13] vfio: Add save and load functions for VFIO PCI devices

2019-07-08 Thread Kirti Wankhede
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 | 114 ++ include/hw/vfio/vfio

[Qemu-devel] [PATCH v6 07/13] vfio: Add migration state change notifier

2019-07-08 Thread Kirti Wankhede
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 | 54

[Qemu-devel] [PATCH v6 13/13] vfio: Make vfio-pci device migration capable.

2019-07-08 Thread Kirti Wankhede
Call vfio_migration_probe() and vfio_migration_finalize() functions for vfio-pci device to enable migration for vfio PCI device. Removed vfio_pci_vmstate structure. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/pci.c | 15 +-- 1 file changed, 9 insertions(+), 6

[Qemu-devel] [PATCH v6 12/13] vfio: Add vfio_listerner_log_sync to mark dirty pages

2019-07-08 Thread Kirti Wankhede
vfio_listerner_log_sync gets list of dirty pages from vendor driver and mark those pages dirty when in _SAVING state. Return early for the RAM block section of mapped MMIO region. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/common.c | 35

[Qemu-devel] [PATCH v6 10/13] vfio: Add load state functions to SaveVMHandlers

2019-07-08 Thread Kirti Wankhede
. - Repeat above until VFIO_MIG_FLAG_END_OF_STATE. - Unmap migration region. 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 | 162 +++ hw

[Qemu-devel] [PATCH v6 03/13] vfio: Add vfio_get_object callback to VFIODeviceOps

2019-07-08 Thread Kirti Wankhede
Hook vfio_get_object callback for PCI devices. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia Suggested-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/pci.c b/hw/vfio/pci.c index

[Qemu-devel] [PATCH v6 05/13] vfio: Add migration region initialization and finalize function

2019-07-08 Thread Kirti Wankhede
supported else migration is blocked. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/Makefile.objs | 2 +- hw/vfio/migration.c | 145 ++ hw/vfio/trace-events | 3 + include/hw/vfio/vfio-common.h | 14 4 files

[Qemu-devel] [PATCH v6 06/13] vfio: Add VM state change handler to know state of VM

2019-07-08 Thread Kirti Wankhede
mutex that is used to serialize operations on migration data region during saving state. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/migration.c | 64 +++ hw/vfio/trace-events | 2 ++ include/hw/vfio/vfio-common.h | 4 +

[Qemu-devel] [PATCH v6 02/13] vfio: Add function to unmap VFIO region

2019-07-08 Thread Kirti Wankhede
This function is used in follwing patch in this series. Migration region is mmaped when migration starts and will be unmapped when migration is complete. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/common.c | 20 hw/vfio/trace-events

[Qemu-devel] [PATCH v6 08/13] vfio: Register SaveVMHandlers for VFIO device

2019-07-08 Thread Kirti Wankhede
hftr46zgI/LM68ipWZZXntTW1e5NyGdso Gajrdkggu3WlC2d4oniUCgQmSWA9QPPojqDSt5bx23/NV64YJtHjDyV81PT1TX+Rez yskR4PtGVBJmbfZ17G+SK0S+vGMpIxoBSDuZnqyqb41CDY9ExPWzrV3pLQgZvD/5r8 o93QNSARfaWNeLt5InRFa/G6Oop8gLEi5lCTo3HFOYs0FBjXCGk6yZHHMrN4q/ssog gLjyJR6pxp6wQ== Signed-off-by: Kirti Wankhede Re

[Qemu-devel] [PATCH v7 00/13] Add migration support for VFIO device

2019-07-09 Thread Kirti Wankhede
f 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 (13): vfio: KABI for migration interface vfio: Add function to

[Qemu-devel] [PATCH v7 01/13] vfio: KABI for migration interface

2019-07-09 Thread Kirti Wankhede
is page aligned. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- linux-headers/linux/vfio.h | 166 + 1 file changed, 166 insertions(+) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index 24f505199f83..6696a4600545 100644

[Qemu-devel] [PATCH v7 02/13] vfio: Add function to unmap VFIO region

2019-07-09 Thread Kirti Wankhede
This function is used in follwing patch in this series. Migration region is mmaped when migration starts and will be unmapped when migration is complete. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/common.c | 20 hw/vfio/trace-events

[Qemu-devel] [PATCH v7 07/13] vfio: Add migration state change notifier

2019-07-09 Thread Kirti Wankhede
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 | 54

[Qemu-devel] [PATCH v7 05/13] vfio: Add migration region initialization and finalize function

2019-07-09 Thread Kirti Wankhede
supported else migration is blocked. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/Makefile.objs | 2 +- hw/vfio/migration.c | 145 ++ hw/vfio/trace-events | 3 + include/hw/vfio/vfio-common.h | 14 4 files

[Qemu-devel] [PATCH v7 03/13] vfio: Add vfio_get_object callback to VFIODeviceOps

2019-07-09 Thread Kirti Wankhede
Hook vfio_get_object callback for PCI devices. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia Suggested-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/pci.c b/hw/vfio/pci.c index

[Qemu-devel] [PATCH v7 12/13] vfio: Add vfio_listerner_log_sync to mark dirty pages

2019-07-09 Thread Kirti Wankhede
vfio_listerner_log_sync gets list of dirty pages from vendor driver and mark those pages dirty when in _SAVING state. Return early for the RAM block section of mapped MMIO region. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/common.c | 35

[Qemu-devel] [PATCH v7 09/13] vfio: Add save state functions to SaveVMHandlers

2019-07-09 Thread Kirti Wankhede
ere to serial migration buffer read operation. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/migration.c | 246 +++ hw/vfio/trace-events | 6 ++ 2 files changed, 252 insertions(+) diff --git a/hw/vfio/migration.c b/hw/vfio/migr

[Qemu-devel] [PATCH v7 08/13] vfio: Register SaveVMHandlers for VFIO device

2019-07-09 Thread Kirti Wankhede
ning 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 | 82 +++- hw/v

[Qemu-devel] [PATCH v7 04/13] vfio: Add save and load functions for VFIO PCI devices

2019-07-09 Thread Kirti Wankhede
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 | 114 ++ include/hw/vfio/vfio

[Qemu-devel] [PATCH v7 13/13] vfio: Make vfio-pci device migration capable.

2019-07-09 Thread Kirti Wankhede
Call vfio_migration_probe() and vfio_migration_finalize() functions for vfio-pci device to enable migration for vfio PCI device. Removed vfio_pci_vmstate structure. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/pci.c | 15 +-- 1 file changed, 9 insertions(+), 6

[Qemu-devel] [PATCH v7 11/13] vfio: Add function to get dirty page list

2019-07-09 Thread Kirti Wankhede
itmap from the region or mmaped part of the region. - Iterate above steps till page bitmap for all requested pfns are copied. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/migration.c | 123 ++ hw/vfio/trace-events

[Qemu-devel] [PATCH v7 06/13] vfio: Add VM state change handler to know state of VM

2019-07-09 Thread Kirti Wankhede
mutex that is used to serialize operations on migration data region during saving state. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/migration.c | 64 +++ hw/vfio/trace-events | 2 ++ include/hw/vfio/vfio-common.h | 4 +

[Qemu-devel] [PATCH v7 10/13] vfio: Add load state functions to SaveVMHandlers

2019-07-09 Thread Kirti Wankhede
. - Repeat above until VFIO_MIG_FLAG_END_OF_STATE. - Unmap migration region. 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 | 162 +++ hw

Re: [Qemu-devel] [PATCH v7 00/13] Add migration support for VFIO device

2019-07-11 Thread Kirti Wankhede
ion going with Alex. I addressed the concern there. Please check current patchset, which addresses the concerns raised. >>>> Also, I'm glad to see that you updated code by following my comments below, >>>> but please don't forget to reply my comments next time:) I tried t

Re: [Qemu-devel] [PATCH v7 06/13] vfio: Add VM state change handler to know state of VM

2019-07-11 Thread Kirti Wankhede
On 7/11/2019 5:43 PM, Dr. David Alan Gilbert wrote: > * Kirti Wankhede (kwankh...@nvidia.com) wrote: >> VM state change handler gets called on change in VM's state. This is used to >> set >> VFIO device state to _RUNNING. >> VM state change handler, migration s

[Qemu-devel] [PATCH v3 2/5] Add save and load functions for VFIO PCI devices

2019-02-19 Thread Kirti Wankhede
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 | 106 ++ hw/vfio/pci.h | 29

[Qemu-devel] [PATCH v3 4/5] Add vfio_listerner_log_sync to mark dirty pages

2019-02-19 Thread Kirti Wankhede
vfio_listerner_log_sync gets list of dirty pages from vendor driver and mark those pages dirty. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/common.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index

[Qemu-devel] [PATCH v3 1/5] VFIO KABI for migration interface

2019-02-19 Thread Kirti Wankhede
t which is page aligned. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- linux-headers/linux/vfio.h | 65 ++ 1 file changed, 65 insertions(+) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index 12a7b1dc53c8..1b12a9b95e00

[Qemu-devel] [PATCH v3 0/5] Add migration support for VFIO device

2019-02-19 Thread Kirti Wankhede
ped 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 (5): VFIO KABI for migration interface Add save and load functions for VFIO PCI

[Qemu-devel] [PATCH v3 3/5] Add migration functions for VFIO devices

2019-02-19 Thread Kirti Wankhede
st of the region or mmaped part of the region. This copy is iterated till page bitmap for all requested pfns are copied. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/Makefile.objs | 2 +- hw/vfio/migration.c

[Qemu-devel] [PATCH v3 5/5] Make vfio-pci device migration capable.

2019-02-19 Thread Kirti Wankhede
Call vfio_migration_probe() and vfio_migration_finalize() functions for vfio-pci device to enable migration for vfio PCI device. Removed vfio_pci_vmstate structure. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/pci.c | 11 +-- 1 file changed, 5 insertions(+), 6

Re: [Qemu-devel] [PATCH v3 0/5] Add migration support for VFIO device

2019-02-20 Thread Kirti Wankhede
On 2/20/2019 3:52 PM, Dr. David Alan Gilbert wrote: > * Kirti Wankhede (kwankh...@nvidia.com) wrote: >> Add migration support for VFIO device > > Hi Kirti, > Can you explain how this compares and works with Yan Zhao's > set? This patch set is incremental versio

Re: [Qemu-devel] [PATCH v3 1/5] VFIO KABI for migration interface

2019-02-26 Thread Kirti Wankhede
Alex, On 2/22/2019 3:53 AM, Alex Williamson wrote: > On Wed, 20 Feb 2019 02:53:16 +0530 > Kirti Wankhede wrote: > >> - Defined MIGRATION region type and sub-type. >> - Used 2 bits to define VFIO device states. >> Bit 0 => 0/1 => _STOPPED/_RUNNING >>

Re: [Qemu-devel] [PATCH v3 3/5] Add migration functions for VFIO devices

2019-02-26 Thread Kirti Wankhede
On 2/22/2019 4:08 AM, Alex Williamson wrote: > On Wed, 20 Feb 2019 02:53:18 +0530 > Kirti Wankhede wrote: > >> - Migration function are implemented for VFIO_DEVICE_TYPE_PCI device. >> - Added SaveVMHandlers and implemented all basic functions required for live >>

[PATCH QEMU v25 00/17] Add migration support for VFIO devices

2020-09-22 Thread Kirti Wankhede
offset of migration 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 a

[PATCH v26 01/17] vfio: Add function to unmap VFIO region

2020-09-22 Thread Kirti Wankhede
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

[PATCH v26 03/17] vfio: Add save and load functions for VFIO PCI devices

2020-09-22 Thread Kirti Wankhede
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

[PATCH v26 07/17] vfio: Register SaveVMHandlers for VFIO device

2020-09-22 Thread Kirti Wankhede
ning 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/v

[PATCH v26 02/17] vfio: Add vfio_get_object callback to VFIODeviceOps

2020-09-22 Thread Kirti Wankhede
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

[PATCH v26 04/17] vfio: Add migration region initialization and finalize function

2020-09-22 Thread Kirti Wankhede
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

[PATCH v26 05/17] vfio: Add VM state change handler to know state of VM

2020-09-22 Thread Kirti Wankhede
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

[PATCH v26 17/17] qapi: Add VFIO devices migration stats in Migration stats

2020-09-22 Thread Kirti Wankhede
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

[PATCH v26 06/17] vfio: Add migration state change notifier

2020-09-22 Thread Kirti Wankhede
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

[PATCH v26 11/17] vfio: Get migration capability flags for container

2020-09-22 Thread Kirti Wankhede
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

[PATCH v26 09/17] vfio: Add load state functions to SaveVMHandlers

2020-09-22 Thread Kirti Wankhede
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

[PATCH v26 08/17] vfio: Add save state functions to SaveVMHandlers

2020-09-22 Thread Kirti Wankhede
offset of 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(+) d

[PATCH v26 10/17] memory: Set DIRTY_MEMORY_MIGRATION when IOMMU is enabled

2020-09-22 Thread Kirti Wankhede
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 ---

[PATCH v26 12/17] vfio: Add function to start and stop dirty pages tracking

2020-09-22 Thread Kirti Wankhede
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

[PATCH v26 13/17] vfio: create mapped iova list when vIOMMU is enabled

2020-09-22 Thread Kirti Wankhede
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

[PATCH v26 14/17] vfio: Add vfio_listener_log_sync to mark dirty pages

2020-09-22 Thread Kirti Wankhede
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

[PATCH v26 15/17] vfio: Add ioctl to get dirty pages bitmap during dma unmap.

2020-09-22 Thread Kirti Wankhede
: 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

[PATCH v26 16/17] vfio: Make vfio-pci device migration capable

2020-09-22 Thread Kirti Wankhede
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

[PATCH v1] docs/devel: Add VFIO device migration documentation

2020-10-28 Thread Kirti Wankhede
Document interfaces used for VFIO device migration. Added flow of state changes during live migration with VFIO device. Signed-off-by: Kirti Wankhede --- MAINTAINERS | 1 + docs/devel/vfio-migration.rst | 119 ++ 2 files changed, 120

Re: [PATCH v1] docs/devel: Add VFIO device migration documentation

2020-10-29 Thread Kirti Wankhede
Thanks for corrections Cornelia. I had done the corrections you suggested I had not replied, see my comments on couple of places where I disagree. On 10/29/2020 5:22 PM, Cornelia Huck wrote: On Thu, 29 Oct 2020 11:23:11 +0530 Kirti Wankhede wrote: Document interfaces used for VFIO device

Re: Out-of-Process Device Emulation session at KVM Forum 2020

2020-10-29 Thread Kirti Wankhede
On 10/29/2020 10:12 PM, Daniel P. Berrangé wrote: On Thu, Oct 29, 2020 at 04:15:30PM +, David Edmondson wrote: On Thursday, 2020-10-29 at 21:02:05 +08, Jason Wang wrote: 2) Did qemu even try to migrate opaque blobs before? It's probably a bad design of migration protocol as well. The

Re: [PATCH v1] docs/devel: Add VFIO device migration documentation

2020-11-03 Thread Kirti Wankhede
On 10/30/2020 12:35 AM, Alex Williamson wrote: On Thu, 29 Oct 2020 23:11:16 +0530 Kirti Wankhede wrote: +System memory dirty pages tracking +-- + +A ``log_sync`` memory listener callback is added to mark system memory pages s/is added to mark/marks

Re: [PATCH v1] docs/devel: Add VFIO device migration documentation

2020-11-03 Thread Kirti Wankhede
On 11/4/2020 1:57 AM, Alex Williamson wrote: On Wed, 4 Nov 2020 01:18:12 +0530 Kirti Wankhede wrote: On 10/30/2020 12:35 AM, Alex Williamson wrote: On Thu, 29 Oct 2020 23:11:16 +0530 Kirti Wankhede wrote: +System memory dirty pages tracking

Re: [PATCH v1] docs/devel: Add VFIO device migration documentation

2020-11-05 Thread Kirti Wankhede
On 11/4/2020 6:15 PM, Alex Williamson wrote: On Wed, 4 Nov 2020 13:25:40 +0530 Kirti Wankhede wrote: On 11/4/2020 1:57 AM, Alex Williamson wrote: On Wed, 4 Nov 2020 01:18:12 +0530 Kirti Wankhede wrote: On 10/30/2020 12:35 AM, Alex Williamson wrote: On Thu, 29 Oct 2020 23:11:16

Re: [PATCH v1] docs/devel: Add VFIO device migration documentation

2020-11-05 Thread Kirti Wankhede
On 11/6/2020 12:41 AM, Alex Williamson wrote: On Fri, 6 Nov 2020 00:29:36 +0530 Kirti Wankhede wrote: On 11/4/2020 6:15 PM, Alex Williamson wrote: On Wed, 4 Nov 2020 13:25:40 +0530 Kirti Wankhede wrote: On 11/4/2020 1:57 AM, Alex Williamson wrote: On Wed, 4 Nov 2020 01:18:12 +0530

[PATCH 1/1] Change the order of g_free(info) and tracepoint

2020-11-06 Thread Kirti Wankhede
Fixes Coverity issue: CID 1436126: Memory - illegal accesses (USE_AFTER_FREE) Fixes: a9e271ec9b36 ("vfio: Add migration region initialization and finalize function") Signed-off-by: Kirti Wankhede --- hw/vfio/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v2 1/1] Fix use after free in vfio_migration_probe

2020-11-06 Thread Kirti Wankhede
Fixes Coverity issue: CID 1436126: Memory - illegal accesses (USE_AFTER_FREE) Fixes: a9e271ec9b36 ("vfio: Add migration region initialization and finalize function") Signed-off-by: Kirti Wankhede Reviewed-by: David Edmondson Reviewed-by: Alex Bennée Reviewed-by: Philippe Mat

Re: [PATCH v1] docs/devel: Add VFIO device migration documentation

2020-11-06 Thread Kirti Wankhede
On 11/6/2020 2:56 AM, Alex Williamson wrote: On Fri, 6 Nov 2020 02:22:11 +0530 Kirti Wankhede wrote: On 11/6/2020 12:41 AM, Alex Williamson wrote: On Fri, 6 Nov 2020 00:29:36 +0530 Kirti Wankhede wrote: On 11/4/2020 6:15 PM, Alex Williamson wrote: On Wed, 4 Nov 2020 13:25:40 +0530

Re: [RFC PATCH for-QEMU-5.2] vfio: Make migration support experimental

2020-11-10 Thread Kirti Wankhede
width usage that required; so that's going in completely the wrong direction and also wrong from the point of view of the user. Dave Alex Reviewed-by: Dr. David Alan Gilbert Link: https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg00807.html Cc: Kirti Wankhede Cc: Neo Jia Cc:

[PATCH 1/1] Fix to show vfio migration stat in migration status

2020-11-18 Thread Kirti Wankhede
Header file where CONFIG_VFIO is defined is not included in migration.c file. Include config devices header file in migration.c. Fixes: 3710586caa5d ("qapi: Add VFIO devices migration stats in Migration stats") Signed-off-by: Kirti Wankhede --- meson.build | 1 +

Re: [PATCH RFC] vfio: Set the priority of VFIO VM state change handler explicitly

2020-11-18 Thread Kirti Wankhede
); migration->migration_state.notify = vfio_migration_state_notifier; add_migration_state_change_notifier(&migration->migration_state); Looks good to me. Reviewed-by: Kirti Wankhede

[PATCH 1/1] vfio: Change default dirty pages tracking behavior during migration

2020-11-18 Thread Kirti Wankhede
device, dirty pages tracking during iterative phase will be disabled. Signed-off-by: Kirti Wankhede --- hw/vfio/common.c | 11 +++ hw/vfio/pci.c | 3 +++ include/hw/vfio/vfio-common.h | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/hw/vfi

Re: [PATCH RFC] vfio: Move the saving of the config space to the right place in VFIO migration

2020-11-19 Thread Kirti Wankhede
On 11/14/2020 2:47 PM, Shenming Lu wrote: When running VFIO migration, I found that the restoring of VFIO PCI device’s config space is before VGIC on ARM64 target. But generally, interrupt controllers need to be restored before PCI devices. Is there any other way by which VGIC can be resto

<    5   6   7   8   9   10