Do not reset a vfio-pci device during CPR, and do not complain if the
kernel's PCI config space changes for non-emulated bits between the
vmstate save and load, which can happen due to ongoing interrupt activity.
Signed-off-by: Steve Sistare
---
include/hw/vfio/vfio-cpr.h | 2 ++
hw/vfio/
changes when sent to new QEMU via SCM_RIGHTS. Hence the
user cannot send getfd to new QEMU, but when the user sends a
hotplug command that references the fd, cpr_get_fd_param finds
its value in CPR state.
Signed-off-by: Steve Sistare
Reviewed-by: Fabiano Rosas
---
include/migration/cpr.h | 2
Move event_notifier_init calls to a helper vfio_notifier_init.
This version is trivial, but it will be expanded to support CPR
in subsequent patches. No functional change.
Signed-off-by: Steve Sistare
Reviewed-by: Cédric Le Goater
---
hw/vfio/pci.c | 40
During CPR, after VFIO_DMA_UNMAP_FLAG_VADDR, the vaddr is temporarily
invalid, so mediated devices cannot be supported. Add a blocker for them.
This restriction will not apply to iommufd containers when CPR is added
for them in a future patch.
Signed-off-by: Steve Sistare
Reviewed-by: Cédric Le
Export various MSI functions, renamed with a vfio_pci prefix, for use by
CPR in subsequent patches. No functional change.
Signed-off-by: Steve Sistare
---
hw/vfio/pci.h | 8
hw/vfio/pci.c | 29 +
2 files changed, 25 insertions(+), 12 deletions(-)
diff
Signed-off-by: Steve Sistare
---
include/hw/vfio/vfio-device.h | 2 ++
include/migration/cpr.h | 2 ++
include/system/kvm.h | 1 +
accel/kvm/kvm-all.c | 28
accel/stubs/kvm-stub.c| 5 +
hw/vfio/helpers.c | 10
Pass vdev and nr to vfio_notifier_init, for use by CPR in a subsequent
patch. No functional change.
Signed-off-by: Steve Sistare
Reviewed-by: Cédric Le Goater
---
hw/vfio/pci.c | 31 +++
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/hw/vfio/pci.c
device object will be defined by the vfio subsystem
in a subsequent patch.
Signed-off-by: Steve Sistare
---
include/hw/vfio/vfio-cpr.h | 1 +
include/migration/cpr.h| 12
hw/vfio/cpr-iommufd.c | 2 ++
migration/cpr.c| 14 +-
4 files changed, 20
-off-by: John Levon
Reviewed-by: Cédric Le Goater
Reviewed-by: Steve Sistare
---
include/hw/vfio/vfio-container-base.h | 17 +++--
hw/vfio/container-base.c | 4 ++--
hw/vfio/container.c | 3 ++-
hw/vfio/iommufd.c | 3 ++-
hw/vfio
Define the change process ioctl
Signed-off-by: Steve Sistare
---
include/system/iommufd.h | 2 ++
backends/iommufd.c | 24
backends/trace-events| 1 +
3 files changed, 27 insertions(+)
diff --git a/include/system/iommufd.h b/include/system/iommufd.h
index
section, and the calls will match the mappings remembered by the
kernel.
The listener calls a special dma_map handler that passes the new VA of each
section to the kernel using VFIO_DMA_MAP_FLAG_VADDR. Restore the normal
handler at the end.
Signed-off-by: Steve Sistare
---
include/hw/vfio/vfio
.
Signed-off-by: Steve Sistare
---
backends/iommufd.c | 8
1 file changed, 8 insertions(+)
diff --git a/backends/iommufd.c b/backends/iommufd.c
index 98d83aa..62d1f71 100644
--- a/backends/iommufd.c
+++ b/backends/iommufd.c
@@ -245,6 +245,10 @@ int iommufd_backend_map_file_dma
ed-off-by: Steve Sistare
---
hw/vfio/pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index a1bfdfe..7d3b9ff 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -3296,6 +3296,7 @@ out_teardown:
vfio_bars_exit(vdev);
error:
error_prepen
-off-by: Steve Sistare
---
include/hw/vfio/vfio-cpr.h | 3 ++
hw/vfio/cpr-iommufd.c | 96 +-
hw/vfio/iommufd.c | 2 +
3 files changed, 100 insertions(+), 1 deletion(-)
diff --git a/include/hw/vfio/vfio-cpr.h b/include/hw/vfio/vfio-cpr.h
Define qemu_ram_get_fd_offset, so CPR can map a memory region using
IOMMU_IOAS_MAP_FILE in a subsequent patch.
Signed-off-by: Steve Sistare
Reviewed-by: Peter Xu
Reviewed-by: Zhenzhong Duan
---
include/exec/cpu-common.h | 1 +
system/physmem.c | 5 +
2 files changed, 6 insertions
handlers for the devices that they contain.
Signed-off-by: Steve Sistare
Reviewed-by: Fabiano Rosas
Reviewed-by: Peter Xu
---
include/migration/vmstate.h | 6 +-
migration/savevm.c | 4 ++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/include/migration/vmstate.h
tance.
Signed-off-by: Steve Sistare
---
hw/vfio/pci.h | 2 +
include/hw/vfio/vfio-cpr.h | 8
hw/vfio/cpr.c | 97 ++
hw/vfio/pci.c | 54 --
4 files changed, 158 insertions(+), 3 dele
Skip allocation of, and attachment to, hwpt_id. Recover it from CPR state.
Signed-off-by: Steve Sistare
---
hw/vfio/iommufd.c | 30 ++
1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c
index 5119c17..f0abd41 100644
a new
"remap" flag that tells it to restore a mapping without re-allocating new
userland data structures.
Signed-off-by: Steve Sistare
Reviewed-by: Cédric Le Goater
---
include/hw/vfio/vfio-container-base.h | 3 ++
include/hw/vfio/vfio-cpr.h| 10
hw/vfio/cp
QEMU must know the fd
number to construct a name to find the fd number.
To fix, create an invariant name based on the id command-line parameter,
if id is defined. The user will need to provide such an id to use CPR.
Signed-off-by: Steve Sistare
---
hw/vfio/device.c | 15 ++-
1 file
Finish CPR by change the owning process of the iommufd device in
post load.
Signed-off-by: Steve Sistare
---
hw/vfio/cpr-iommufd.c | 30 ++
1 file changed, 30 insertions(+)
diff --git a/hw/vfio/cpr-iommufd.c b/hw/vfio/cpr-iommufd.c
index 152a661..a9e3f68 100644
CPR is integrated with live migration, and has the same maintainers.
But, add a CPR section to add a reviewer.
Signed-off-by: Steve Sistare
Reviewed-by: Cédric Le Goater
---
MAINTAINERS | 9 +
1 file changed, 9 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index e27d145
subsequent patches.
Signed-off-by: Steve Sistare
---
include/hw/vfio/vfio-cpr.h | 12 +++
include/system/iommufd.h | 1 +
backends/iommufd.c | 10 ++
hw/vfio/cpr-iommufd.c | 84 ++
hw/vfio/iommufd.c | 6 ++--
hw/vfio
Export msix_is_pending for use by cpr. No functional change.
Signed-off-by: Steve Sistare
Acked-by: Michael S. Tsirkin
---
include/hw/pci/msix.h | 1 +
hw/pci/msix.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/hw/pci/msix.h b/include/hw/pci/msix.h
In the container pre_save handler, discard the virtual addresses in DMA
mappings with VFIO_DMA_UNMAP_FLAG_VADDR, because guest RAM will be
remapped at a different VA after in new QEMU. DMA to already-mapped
pages continues.
Signed-off-by: Steve Sistare
Reviewed-by: Cédric Le Goater
---
hw
Define iommufd_backend_map_file_dma to implement IOMMU_IOAS_MAP_FILE.
This will be called as a substitute for iommufd_backend_map_dma, so
the error conditions for BARs are copied as-is from that function.
Signed-off-by: Steve Sistare
Reviewed-by: Zhenzhong Duan
---
include/system/iommufd.h
If an invariant device name cannot be created, block CPR.
Signed-off-by: Steve Sistare
---
include/hw/vfio/vfio-cpr.h | 1 +
hw/vfio/device.c | 11 +++
2 files changed, 12 insertions(+)
diff --git a/include/hw/vfio/vfio-cpr.h b/include/hw/vfio/vfio-cpr.h
index 25e74ee
Pass the vector number to vfio_connect_kvm_msi_virq and
vfio_remove_kvm_msi_virq, so it can be passed to their subroutines in
a subsequent patch. No functional change.
Signed-off-by: Steve Sistare
Reviewed-by: Cédric Le Goater
---
hw/vfio/pci.c | 13 +++--
1 file changed, 7 insertions
vfio_cpr_[un]register_container is no longer used since they were
subsumed by container type-specific registration. Delete them.
Signed-off-by: Steve Sistare
---
include/hw/vfio/vfio-cpr.h | 4
hw/vfio/cpr.c | 13 -
2 files changed, 17 deletions(-)
diff --git a
a matching container, if any, before creating a
new one.
This reconstruction is not complete. hwpt_id is handled in a subsequent
patch.
Signed-off-by: Steve Sistare
---
hw/vfio/iommufd.c | 30 --
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/hw/vfio
Move event_notifier_cleanup calls to a helper vfio_notifier_cleanup.
This version is trivial, and does not yet use the vdev and nr parameters.
No functional change.
Signed-off-by: Steve Sistare
Reviewed-by: Cédric Le Goater
---
hw/vfio/pci.c | 28 +---
1 file changed
Use IOMMU_IOAS_MAP_FILE when the mapped region is backed by a file.
Such a mapping can be preserved without modification during CPR,
because it depends on the file's address space, which does not change,
rather than on the process's address space, which does change.
Signed-off-by: Ste
Do not reset a vfio-pci device during CPR.
Signed-off-by: Steve Sistare
---
include/hw/pci/pci_device.h | 3 +++
hw/pci/pci.c| 5 +
hw/vfio/pci.c | 7 +++
3 files changed, 15 insertions(+)
diff --git a/include/hw/pci/pci_device.h b/include/hw/pci
initialization, but still perform
kvm initialization.
Signed-off-by: Steve Sistare
---
hw/vfio/cpr.c | 27 ++-
hw/vfio/pci.c | 32
2 files changed, 54 insertions(+), 5 deletions(-)
diff --git a/hw/vfio/cpr.c b/hw/vfio/cpr.c
index e467373
Add the cpr_incoming_needed, cpr_open_fd, and cpr_resave_fd helpers,
for use when adding cpr support for vfio and iommufd.
Signed-off-by: Steve Sistare
Reviewed-by: Cédric Le Goater
---
include/migration/cpr.h | 5 +
migration/cpr.c | 36
2
Define vfio_device_free_name to free the name created by
vfio_device_get_name. A subsequent patch will do more there.
No functional change.
Signed-off-by: Steve Sistare
---
include/hw/vfio/vfio-device.h | 1 +
hw/vfio/ap.c | 2 +-
hw/vfio/ccw.c | 2 +-
hw/vfio
parameters that can be trivially derived from mr and xlat.
Lastly, rename the functions to to memory_translate_iotlb() and
vfio_translate_iotlb().
Signed-off-by: Steve Sistare
Acked-by: David Hildenbrand
Reviewed-by: John Levon
Reviewed-by: Cédric Le Goater
Acked-by: Michael S. Tsirkin
Save the iommu and vfio device fd in CPR state when it is created.
After CPR, the fd number is found in CPR state and reused.
Signed-off-by: Steve Sistare
---
backends/iommufd.c| 25 -
hw/vfio/cpr-iommufd.c | 10 ++
hw/vfio/device.c | 9 +
3
, such as vfio ioctl's,
are skipped. The result is that vfio_realize constructs qemu data
structures that reflect the current state of the device.
Signed-off-by: Steve Sistare
---
include/hw/vfio/vfio-cpr.h | 6 +
hw/vfio/container.c
Extract a subroutine vfio_pci_vector_init. No functional change.
Signed-off-by: Steve Sistare
---
hw/vfio/pci.c | 24 +---
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 840590c..2d6dc54 100644
--- a/hw/vfio/pci.c
+++ b/hw
in subsequent patches.
Signed-off-by: Steve Sistare
---
include/hw/vfio/vfio-container.h | 2 ++
include/hw/vfio/vfio-cpr.h | 15 +
hw/vfio/container.c | 6 ++--
hw/vfio/cpr-legacy.c | 69
hw/vfio/cpr.c
cpr_open_fd
* deleted "export iommufd_cdev_get_info_iova_range"
* deleted "reconstruct device"
* deleted "reconstruct hw_caps"
* deleted "define hwpt constructors"
* seperated cpr registration for iommufd be and vfio container
* correctly a
Define vfio_find_ram_discard_listener as a subroutine so additional calls to
it may be added in a subsequent patch.
Signed-off-by: Steve Sistare
Reviewed-by: Cédric Le Goater
---
include/hw/vfio/vfio-container-base.h | 3 +++
hw/vfio/listener.c| 35
Move vfio-cpr.h to include/hw/vfio, because it will need to be included by
other files there.
Signed-off-by: Steve Sistare
Reviewed-by: Cédric Le Goater
---
MAINTAINERS| 1 +
hw/vfio/vfio-cpr.h | 15 ---
include/hw/vfio/vfio-cpr.h | 18
ed-off-by: Steve Sistare
---
hw/vfio/pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index a1bfdfe..7d3b9ff 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -3296,6 +3296,7 @@ out_teardown:
vfio_bars_exit(vdev);
error:
error_prepen
parameters that can be trivially derived from mr and xlat.
Lastly, rename the functions to to memory_translate_iotlb() and
vfio_translate_iotlb().
Signed-off-by: Steve Sistare
Acked-by: David Hildenbrand
---
hw/vfio/listener.c | 33 ++---
hw/virtio/vhost-vdpa.c
parameters that can be trivially derived from mr and xlat.
Lastly, rename the functions to to memory_translate_iotlb() and
vfio_translate_iotlb().
Signed-off-by: Steve Sistare
---
hw/vfio/listener.c | 33 ++---
hw/virtio/vhost-vdpa.c | 9 +++--
include/system
tance.
Signed-off-by: Steve Sistare
---
hw/vfio/cpr.c | 91 ++
hw/vfio/pci.c | 40 ++--
include/hw/vfio/vfio-cpr.h | 8
3 files changed, 136 insertions(+), 3 deletions(-)
diff --git a/hw/vfio/cpr.c b/hw
Export vfio_legacy_dma_map so it may be referenced outside the file
in a subsequent patch.
Signed-off-by: Steve Sistare
---
hw/vfio/container.c | 4 ++--
include/hw/vfio/vfio-container-base.h | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/vfio
cpr-transfer breaks vfio network connectivity to and from the guest, and
the host system log shows:
irq bypass consumer (token a03c32e5) registration fails: -16
which is EBUSY. This occurs because KVM descriptors are still open in
the old QEMU process. Close them.
Signed-off-by: Steve
in subsequent patches.
Signed-off-by: Steve Sistare
---
hw/vfio/container.c | 6 ++--
hw/vfio/cpr-legacy.c | 70
hw/vfio/cpr.c| 5 ++-
hw/vfio/meson.build | 1 +
include/hw/vfio/vfio-container.h
subsequent patches.
Signed-off-by: Steve Sistare
---
hw/vfio/cpr-iommufd.c | 97 ++
hw/vfio/iommufd.c | 6 ++-
hw/vfio/meson.build| 1 +
hw/vfio/vfio-iommufd.h | 1 +
include/hw/vfio/vfio-cpr.h | 8
5 files changed, 111
Export various MSI functions, for use by CPR in subsequent patches.
No functional change.
Signed-off-by: Steve Sistare
---
hw/vfio/pci.c | 21 ++---
hw/vfio/pci.h | 12
2 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
all
to post_load time, after devid has been recovered from vmstate.
Signed-off-by: Steve Sistare
---
hw/vfio/cpr-iommufd.c | 15 +++
hw/vfio/iommufd.c | 6 ++
hw/vfio/vfio-iommufd.h | 3 +++
3 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/hw/vfio/cpr-iommu
Finish CPR by change the owning process of the iommufd device in
post load.
Signed-off-by: Steve Sistare
---
hw/vfio/cpr-iommufd.c | 30 ++
1 file changed, 30 insertions(+)
diff --git a/hw/vfio/cpr-iommufd.c b/hw/vfio/cpr-iommufd.c
index 6d3f4e0..67be775 100644
Pass ramblock to vfio_container_dma_map for use in a subsequent patch.
The ramblock's attributes will be needed to map the block using
IOMMU_IOAS_MAP_FILE. No functional change.
Signed-off-by: Steve Sistare
---
hw/vfio/container-base.c | 3 ++-
hw/vfio/liste
vfio_cpr_[un]register_container is no longer used since they were
subsumed by container type-specific registration. Delete them.
Signed-off-by: Steve Sistare
---
hw/vfio/cpr.c | 13 -
include/hw/vfio/vfio-cpr.h | 4
2 files changed, 17 deletions(-)
diff --git a
stored by the post_load call to vfio_device_hiod_create_and_realize.
Signed-off-by: Steve Sistare
---
hw/vfio/cpr-iommufd.c | 7 +++
hw/vfio/iommufd.c | 24 ++--
hw/vfio/trace-events | 1 +
hw/vfio/vfio-iommufd.h | 3 +++
include/hw/vfio/vfio
Define vfio_find_ram_discard_listener as a subroutine so additional calls to
it may be added in a subsequent patch.
Signed-off-by: Steve Sistare
Reviewed-by: Cédric Le Goater
---
hw/vfio/listener.c| 35 ++-
include/hw/vfio/vfio-container
Define iommufd_backend_map_file_dma to implement IOMMU_IOAS_MAP_FILE.
This will be called as a substitute for iommufd_backend_map_dma, so
the error conditions for BARs are copied as-is from that function.
Signed-off-by: Steve Sistare
---
backends/iommufd.c | 36
Pass the vector number to vfio_connect_kvm_msi_virq and
vfio_remove_kvm_msi_virq, so it can be passed to their subroutines in
a subsequent patch. No functional change.
Signed-off-by: Steve Sistare
---
hw/vfio/pci.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git
Extract a subroutine vfio_vector_init. No functional change.
Signed-off-by: Steve Sistare
---
hw/vfio/pci.c | 24 +---
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 4aa83b1..b46c42e 100644
--- a/hw/vfio/pci.c
+++ b/hw
Save the iommu and vfio device fd in CPR state when it is created.
After CPR, the fd number is found in CPR state and reused. Remember
the reused status for subsequent patches. The reused status is cleared
when vmstate load finishes.
Signed-off-by: Steve Sistare
---
backends/iommufd.c
section, and the calls will match the mappings remembered by the
kernel.
The listener calls a special dma_map handler that passes the new VA of each
section to the kernel using VFIO_DMA_MAP_FLAG_VADDR. Restore the normal
handler at the end.
Signed-off-by: Steve Sistare
---
hw/vfio/container.c
an extra call to
iommufd_backend_get_device_info
No functional change.
Signed-off-by: Steve Sistare
---
hw/vfio/iommufd.c | 116 ++
1 file changed, 65 insertions(+), 51 deletions(-)
diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c
index f645
Export iommufd_cdev_get_info_iova_range, for use by CPR in a subsequent
patch to reconstruct the userland device state. No functional change.
Signed-off-by: Steve Sistare
---
hw/vfio/iommufd.c | 4 ++--
hw/vfio/vfio-iommufd.h | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff
Define qemu_ram_get_fd_offset, so CPR can map a memory region using
IOMMU_IOAS_MAP_FILE in a subsequent patch.
Signed-off-by: Steve Sistare
Reviewed-by: Peter Xu
---
include/exec/cpu-common.h | 1 +
system/physmem.c | 5 +
2 files changed, 6 insertions(+)
diff --git a/include
reuse, device and iommu state is already configured, so operations
in vfio_realize that would modify the configuration, such as vfio ioctl's,
are skipped. The result is that vfio_realize constructs qemu data
structures that reflect the current state of the device.
Signed-off-by: Steve Sistare
--
Define the change process ioctl
Signed-off-by: Steve Sistare
---
backends/iommufd.c | 20
backends/trace-events| 1 +
include/system/iommufd.h | 2 ++
3 files changed, 23 insertions(+)
diff --git a/backends/iommufd.c b/backends/iommufd.c
index 5c1958f..6fed1c1
the reused flag is set. The reused flag is cleared in the post_load
handler.
Signed-off-by: Steve Sistare
---
backends/iommufd.c| 8
hw/vfio/cpr-iommufd.c | 1 +
2 files changed, 9 insertions(+)
diff --git a/backends/iommufd.c b/backends/iommufd.c
index 492747c..c765f2d 100644
changes when sent to new QEMU via SCM_RIGHTS. Hence the
user cannot send getfd to new QEMU, but when the user sends a
hotplug command that references the fd, cpr_get_fd_param finds
its value in CPR state.
Signed-off-by: Steve Sistare
---
include/migration/cpr.h | 2 ++
migration/cpr.c | 40
a new
"remap" flag that tells it to restore a mapping without re-allocating new
userland data structures.
Signed-off-by: Steve Sistare
---
hw/vfio/cpr-legacy.c | 91 +++
hw/vfio/listener.c| 19 +++-
include/hw
Do not reset a vfio-pci device during CPR.
Signed-off-by: Steve Sistare
---
hw/pci/pci.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index fe38c4c..2ba2e0f 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -32,6 +32,8 @@
#include "h
During CPR, after VFIO_DMA_UNMAP_FLAG_VADDR, the vaddr is temporarily
invalid, so mediated devices cannot be supported. Add a blocker for them.
This restriction will not apply to iommufd containers when CPR is added
for them in a future patch.
Signed-off-by: Steve Sistare
---
hw/vfio
Add the cpr_needed_for_reuse and cpr_open_fd, for use when adding cpr
support for vfio and iommufd.
Signed-off-by: Steve Sistare
---
include/migration/cpr.h | 4
migration/cpr.c | 24
2 files changed, 28 insertions(+)
diff --git a/include/migration/cpr.h
initialization, but still perform
kvm initialization.
Signed-off-by: Steve Sistare
---
hw/vfio/cpr.c | 27 ++-
hw/vfio/pci.c | 29 ++---
2 files changed, 52 insertions(+), 4 deletions(-)
diff --git a/hw/vfio/cpr.c b/hw/vfio/cpr.c
index be132fa
we do
need the range info, so defer the call to iommufd_cdev_get_info_iova_range
to a post_load handler, at which time the ioas_id is known.
This reconstruction is not complete. hwpt_id and devid need special
treatment, handled in subsequent patches.
Signed-off-by: Steve Sistare
---
hw/vfi
handlers for the devices that they contain.
Signed-off-by: Steve Sistare
Reviewed-by: Fabiano Rosas
Reviewed-by: Peter Xu
---
include/migration/vmstate.h | 6 +-
migration/savevm.c | 4 ++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/include/migration/vmstate.h
Pass vdev and nr to vfio_notifier_init, for use by CPR in a subsequent
patch. No functional change.
Signed-off-by: Steve Sistare
---
hw/vfio/pci.c | 22 ++
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index dad6209..bfeaafa
Export msix_is_pending for use by cpr. No functional change.
Signed-off-by: Steve Sistare
Acked-by: Michael S. Tsirkin
---
hw/pci/msix.c | 2 +-
include/hw/pci/msix.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/pci/msix.c b/hw/pci/msix.c
index 66f27b9
Move event_notifier_cleanup calls to a helper vfio_notifier_cleanup.
This version is trivial, and does not yet use the vdev and nr parameters.
No functional change.
Signed-off-by: Steve Sistare
---
hw/vfio/pci.c | 28 +---
1 file changed, 17 insertions(+), 11 deletions
parameters that can be trivially derived from mr and xlat.
Signed-off-by: Steve Sistare
---
hw/vfio/listener.c | 29 +++--
hw/virtio/vhost-vdpa.c | 8 ++--
include/system/memory.h | 16 +++-
system/memory.c | 25 -
4 files
In the container pre_save handler, discard the virtual addresses in DMA
mappings with VFIO_DMA_UNMAP_FLAG_VADDR, because guest RAM will be
remapped at a different VA after in new QEMU. DMA to already-mapped
pages continues.
Signed-off-by: Steve Sistare
---
hw/vfio/cpr-legacy.c | 29
Do not reset a vfio-pci device during CPR, and do not complain if the
kernel's PCI config space changes for non-emulated bits between the
vmstate save and load, which can happen due to ongoing interrupt activity.
Signed-off-by: Steve Sistare
---
hw/vfio/cpr.c
QEMU must know the fd
number to construct a name to find the fd number.
To fix, create an invariant name based on the id command-line
parameter. If id is not defined, add a CPR blocker.
Signed-off-by: Steve Sistare
---
hw/vfio/cpr.c | 21 +
hw/vfio/device.c
Move event_notifier_init calls to a helper vfio_notifier_init.
This version is trivial, but it will be expanded to support CPR
in subsequent patches. No functional change.
Signed-off-by: Steve Sistare
---
hw/vfio/pci.c | 40 +---
1 file changed, 25
Use IOMMU_IOAS_MAP_FILE when the mapped region is backed by a file.
Such a mapping can be preserved without modification during CPR,
because it depends on the file's address space, which does not change,
rather than on the process's address space, which does change.
Signed-off-by: Ste
CPR is integrated with live migration, and has the same maintainers.
But, add a CPR section to add a reviewer.
Signed-off-by: Steve Sistare
---
MAINTAINERS | 9 +
1 file changed, 9 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 6dacd6d..d54a532 100644
--- a/MAINTAINERS
oved cleanup patches that were already pulled
* rebased to latest master
Steve Sistare (42):
MAINTAINERS: Add reviewer for CPR
migration: cpr helpers
migration: lower handler priority
vfio: vfio_find_ram_discard_listener
vfio: move vfio-cpr.h
vfio/container: register container for
Move vfio-cpr.h to include/hw/vfio, because it will need to be included by
other files there.
Signed-off-by: Steve Sistare
---
MAINTAINERS| 1 +
hw/vfio/container.c| 2 +-
hw/vfio/cpr.c | 2 +-
hw/vfio/iommufd.c | 2 +-
hw/vfio/vfio-cpr.h
"qom: qom_resolve_path", which was pulled separately
* dropped the error member
* fixed missing _list_tree in qom.py
* updated 10.0 to 10.1
Steve Sistare (5):
qom: qom-tree-get
python: use qom-tree-get
tests/qtest/qom-test: unit test for qom-tree-get
qom: qom-list-getv
tes
Define the qom-list-getv command, which fetches all the properties and
values for a list of paths. This is faster than qom-tree-get when
fetching a subset of the QOM tree. See qom.json for details.
Signed-off-by: Steve Sistare
---
qapi/qom.json | 34
Add a unit test for qom-tree-get
Signed-off-by: Steve Sistare
---
tests/qtest/qom-test.c | 49 +
1 file changed, 49 insertions(+)
diff --git a/tests/qtest/qom-test.c b/tests/qtest/qom-test.c
index 27d70bc..d8792bd 100644
--- a/tests/qtest/qom
Define the qom-tree-get QAPI command, which fetches an entire tree of
properties and values with a single QAPI call. This is much faster
than using qom-list plus qom-get for every node and property of the
tree. See qom.json for details.
Signed-off-by: Steve Sistare
---
qapi/qom.json | 56
Use qom-tree-get to speed up the qom-tree command.
Signed-off-by: Steve Sistare
---
python/qemu/utils/qom.py| 36 +++
python/qemu/utils/qom_common.py | 48 +
2 files changed, 66 insertions(+), 18 deletions(-)
diff
Add a unit test for qom-list-getv.
Signed-off-by: Steve Sistare
---
tests/qtest/qom-test.c | 64 ++
1 file changed, 64 insertions(+)
diff --git a/tests/qtest/qom-test.c b/tests/qtest/qom-test.c
index d8792bd..671b757 100644
--- a/tests/qtest/qom
Add vfio_container_group_add to de-dup some code. No functional change.
Signed-off-by: Steve Sistare
Reviewed-by: Cedric Le Goater
---
hw/vfio/container.c | 47 +--
1 file changed, 25 insertions(+), 22 deletions(-)
diff --git a/hw/vfio/container.c
Replace the proliferation of exit labels in vfio_container_connect with
conditionals for cleaning each piece of state. No functional change.
Signed-off-by: Steve Sistare
Reviewed-by: Cedric Le Goater
---
hw/vfio/container.c | 60 +
1 file
Cleanup a few vfio functions prior to the introduction of CPR.
These were extracted from
https://lore.kernel.org/qemu-devel/1739542467-226739-1-git-send-email-steven.sist...@oracle.com/
Changes in V3:
* update to master
Steve Sistare (3):
vfio/container: ram discard disable helper
equivalent.
Signed-off-by: Steve Sistare
Reviewed-by: Cedric Le Goater
---
hw/vfio/container.c | 48 +++-
1 file changed, 27 insertions(+), 21 deletions(-)
diff --git a/hw/vfio/container.c b/hw/vfio/container.c
index 77ff56b..bf4bbd2 100644
--- a/hw
1 - 100 of 988 matches
Mail list logo