[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-9.0.4 33/57] vfio/migration: Report only stop-copy size in vfio_
From: |
Michael Tokarev |
Subject: |
[Stable-9.0.4 33/57] vfio/migration: Report only stop-copy size in vfio_state_pending_exact() |
Date: |
Sat, 9 Nov 2024 15:07:35 +0300 |
From: Avihai Horon <avihaih@nvidia.com>
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>
(cherry picked from commit 3b5948f808e3b99aedfa0aff45cffbe8b7ec07ed)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
index 1149c6b374..3a97d56950 100644
--- a/hw/vfio/migration.c
+++ b/hw/vfio/migration.c
@@ -486,9 +486,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.5
- [Stable-9.0.4 24/57] Revert "hw/sh4/r2d: Realize IDE controller before accessing it", (continued)
- [Stable-9.0.4 24/57] Revert "hw/sh4/r2d: Realize IDE controller before accessing it", Michael Tokarev, 2024/11/09
- [Stable-9.0.4 25/57] tests/qemu-iotests/211.out: Update to expect MapEntry 'compressed' field, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 22/57] KVM: Dynamic sized kvm memslots array, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 27/57] tcg: Reset data_gen_ptr correctly, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 26/57] raw-format: Fix error message for invalid offset/size, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 28/57] target/i386: Walk NPT in guest real mode, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 30/57] linux-user: Emulate /proc/self/maps under mmap_lock, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 29/57] target/i386: Use probe_access_full_mmu in ptw_translate, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 31/57] linux-user/ppc: Fix sigmask endianness issue in sigreturn, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 32/57] linux-user/riscv: Fix definition of RISCV_HWPROBE_EXT_ZVFHMIN, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 33/57] vfio/migration: Report only stop-copy size in vfio_state_pending_exact(),
Michael Tokarev <=
- [Stable-9.0.4 34/57] gitlab: make check-[dco|patch] a little more verbose, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 35/57] dockerfiles: fix default targets for debian-loongarch-cross, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 36/57] Fix calculation of minimum in colo_compare_tcp, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 37/57] net: fix build when libbpf is disabled, but libxdp is enabled, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 38/57] net/tap-win32: Fix gcc 14 format truncation errors, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 39/57] target/arm: Don't assert in regime_is_user() for E10 mmuidx values, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 40/57] target/riscv/csr.c: Fix an access to VXSAT, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 41/57] target/riscv: Correct SXL return value for RV32 in RV64 QEMU, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 43/57] target/riscv: Set vtype.vill on CPU reset, Michael Tokarev, 2024/11/09
- [Stable-9.0.4 42/57] hw/intc: Don't clear pending bits on IRQ lowering, Michael Tokarev, 2024/11/09