qemu-kvm/kvm-vfio-migration-Report-only-stop-copy-size-in-vfio_st.patch
Miroslav Rezanina 462008473e * Mon Nov 11 2024 Miroslav Rezanina <mrezanin@redhat.com> - 9.1.0-2
- kvm-hw-s390x-ipl-Provide-more-memory-to-the-s390-ccw.img.patch [RHEL-11424]
- kvm-pc-bios-s390-ccw-Use-the-libc-from-SLOF-and-remove-s.patch [RHEL-11424]
- kvm-pc-bios-s390-ccw-Link-the-netboot-code-into-the-main.patch [RHEL-11424]
- kvm-redhat-Remove-the-s390-netboot.img-from-the-spec-fil.patch [RHEL-11424]
- kvm-hw-s390x-Remove-the-possibility-to-load-the-s390-net.patch [RHEL-11424]
- kvm-pc-bios-s390-ccw-Merge-netboot.mak-into-the-main-Mak.patch [RHEL-11424]
- kvm-docs-system-s390x-bootdevices-Update-the-documentati.patch [RHEL-11424]
- kvm-pc-bios-s390-ccw-Remove-panics-from-ISO-IPL-path.patch [RHEL-11424]
- kvm-pc-bios-s390-ccw-Remove-panics-from-ECKD-IPL-path.patch [RHEL-11424]
- kvm-pc-bios-s390-ccw-Remove-panics-from-SCSI-IPL-path.patch [RHEL-11424]
- kvm-pc-bios-s390-ccw-Remove-panics-from-DASD-IPL-path.patch [RHEL-11424]
- kvm-pc-bios-s390-ccw-Remove-panics-from-Netboot-IPL-path.patch [RHEL-11424]
- kvm-pc-bios-s390-ccw-Enable-failed-IPL-to-return-after-e.patch [RHEL-11424]
- kvm-include-hw-s390x-Add-include-files-for-common-IPL-st.patch [RHEL-11424]
- kvm-s390x-Add-individual-loadparm-assignment-to-CCW-devi.patch [RHEL-11424]
- kvm-hw-s390x-Build-an-IPLB-for-each-boot-device.patch [RHEL-11424]
- kvm-s390x-Rebuild-IPLB-for-SCSI-device-directly-from-DIA.patch [RHEL-11424]
- kvm-pc-bios-s390x-Enable-multi-device-boot-loop.patch [RHEL-11424]
- kvm-docs-system-Update-documentation-for-s390x-IPL.patch [RHEL-11424]
- kvm-tests-qtest-Add-s390x-boot-order-tests-to-cdrom-test.patch [RHEL-11424]
- kvm-pc-bios-s390-ccw-Clarify-alignment-is-in-bytes.patch [RHEL-11424]
- kvm-pc-bios-s390-ccw-Don-t-generate-TEXTRELs.patch [RHEL-11424]
- kvm-pc-bios-s390-ccw-Introduce-EXTRA_LDFLAGS.patch [RHEL-11424]
- kvm-vfio-migration-Report-only-stop-copy-size-in-vfio_st.patch [RHEL-64307]
- kvm-vfio-migration-Change-trace-formats-from-hex-to-deci.patch [RHEL-64307]
- kvm-kvm-Allow-kvm_arch_get-put_registers-to-accept-Error.patch [RHEL-60914]
- kvm-target-i386-kvm-Report-which-action-failed-in-kvm_ar.patch [RHEL-60914]
- Resolves: RHEL-11424
  ([IBM 9.6 FEAT] KVM: Full boot order support - qemu part)
- Resolves: RHEL-64307
  (High threshold value observed in vGPU live migration)
- Resolves: RHEL-60914
  (Fail migration properly when put cpu register fails)
2024-11-11 08:48:00 -05:00

67 lines
2.5 KiB
Diff

From 4d37b5f77a60ea951c33ac715584bb6f5897006a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com>
Date: Wed, 6 Nov 2024 17:28:32 +0100
Subject: [PATCH 24/27] vfio/migration: Report only stop-copy size in
vfio_state_pending_exact()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
RH-Author: Cédric Le Goater <clg@redhat.com>
RH-MergeRequest: 282: vfio/migration: Report only stop-copy size in vfio_state_pending_exact()
RH-Jira: RHEL-64307
RH-Acked-by: Peter Xu <peterx@redhat.com>
RH-Acked-by: Alex Williamson <None>
RH-Commit: [1/2] 5330acbef6f8a8ada56bd4c7f616138df1a94112 (clegoate/qemu-kvm-c9s)
JIRA: https://issues.redhat.com/browse/RHEL-64307
commit 3b5948f808e3b99aedfa0aff45cffbe8b7ec07ed
Author: Avihai Horon <avihaih@nvidia.com>
Date: Sun Oct 20 16:01:06 2024 +0300
vfio/migration: Report only stop-copy size in vfio_state_pending_exact()
vfio_state_pending_exact() is used to update migration core how much
device data is left for the device migration. Currently, the sum of
pre-copy and stop-copy sizes of the VFIO device are reported.
The pre-copy size is obtained via the VFIO_MIG_GET_PRECOPY_INFO ioctl,
which returns the amount of device data available to be transferred
while the device is in the PRE_COPY states.
The stop-copy size is obtained via the VFIO_DEVICE_FEATURE_MIG_DATA_SIZE
ioctl, which returns the total amount of device data left to be
transferred in order to complete the device migration.
According to the above, current implementation is wrong -- it reports
extra overlapping data because pre-copy size is already contained in
stop-copy size. Fix it by reporting only stop-copy size.
Fixes: eda7362af959 ("vfio/migration: Add VFIO migration pre-copy support")
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
hw/vfio/migration.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
index 262d42a46e..dd717e8d6c 100644
--- a/hw/vfio/migration.c
+++ b/hw/vfio/migration.c
@@ -576,9 +576,6 @@ static void vfio_state_pending_exact(void *opaque, uint64_t *must_precopy,
if (vfio_device_state_is_precopy(vbasedev)) {
vfio_query_precopy_size(migration);
-
- *must_precopy +=
- migration->precopy_init_size + migration->precopy_dirty_size;
}
trace_vfio_state_pending_exact(vbasedev->name, *must_precopy, *can_postcopy,
--
2.39.3