History log of /openbmc/qemu/migration/ (Results 76 – 100 of 2248)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
ee1004bb29-Jan-2024 Philippe Mathieu-Daudé <philmd@linaro.org>

bulk: Access existing variables initialized to &S->F when available

When a variable is initialized to &struct->field, use it
in place. Rationale: while this makes the code more concise,
this also he

bulk: Access existing variables initialized to &S->F when available

When a variable is initialized to &struct->field, use it
in place. Rationale: while this makes the code more concise,
this also helps static analyzers.

Mechanical change using the following Coccinelle spatch script:

@@
type S, F;
identifier s, m, v;
@@
S *s;
...
F *v = &s->m;
<+...
- &s->m
+ v
...+>

Inspired-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240129164514.73104-2-philmd@linaro.org>
Acked-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
[thuth: Dropped hunks that need a rebase, and fixed sizeof() in pmu_realize()]
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...

46ff64a812-Mar-2024 Zhao Liu <zhao1.liu@intel.com>

error: Move ERRP_GUARD() to the beginning of the function

Since the commit 05e385d2a9 ("error: Move ERRP_GUARD() to the beginning
of the function"), there are new codes that don't put ERRP_GUARD() a

error: Move ERRP_GUARD() to the beginning of the function

Since the commit 05e385d2a9 ("error: Move ERRP_GUARD() to the beginning
of the function"), there are new codes that don't put ERRP_GUARD() at
the beginning of the functions.

As stated in the commit 05e385d2a9: "include/qapi/error.h advises to put
ERRP_GUARD() right at the beginning of the function, because only then
can it guard the whole function.", so clean up the few spots
disregarding the advice.

Inspired-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240312060337.3240965-1-zhao1.liu@linux.intel.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...

35e83a9f10-Mar-2024 Zhao Liu <zhao1.liu@intel.com>

migration/option: Fix missing ERRP_GUARD() for error_prepend()

As the comment in qapi/error, passing @errp to error_prepend() requires
ERRP_GUARD():

* = Why, when and how to use ERRP_GUARD() =
*
*

migration/option: Fix missing ERRP_GUARD() for error_prepend()

As the comment in qapi/error, passing @errp to error_prepend() requires
ERRP_GUARD():

* = Why, when and how to use ERRP_GUARD() =
*
* Without ERRP_GUARD(), use of the @errp parameter is restricted:
...
* - It should not be passed to error_prepend(), error_vprepend() or
* error_append_hint(), because that doesn't work with &error_fatal.
* ERRP_GUARD() lifts these restrictions.
*
* To use ERRP_GUARD(), add it right at the beginning of the function.
* @errp can then be used without worrying about the argument being
* NULL or &error_fatal.

ERRP_GUARD() could avoid the case when @errp is &error_fatal, the user
can't see this additional information, because exit() happens in
error_setg earlier than information is added [1].

The migrate_params_check() passes @errp to error_prepend() without
ERRP_GUARD(), and it could be called from migration_object_init(),
where the passed @errp points to @error_fatal.

Therefore, the error message echoed in error_prepend() will be lost
because of the above issue.

To fix this, add missing ERRP_GUARD() at the beginning of this function.

[1]: Issue description in the commit message of commit ae7c80a7bd73
("error: New macro ERRP_GUARD()").

Cc: Peter Xu <peterx@redhat.com>
Cc: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Acked-by: Peter Xu <peterx@redhat.com>
Message-ID: <20240311033822.3142585-28-zhao1.liu@linux.intel.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


/openbmc/qemu/.gitlab-ci.d/base.yml
/openbmc/qemu/.gitlab-ci.d/buildtest.yml
/openbmc/qemu/.gitlab-ci.d/opensbi.yml
/openbmc/qemu/MAINTAINERS
/openbmc/qemu/accel/tcg/cputlb.c
/openbmc/qemu/accel/tcg/plugin-gen.c
/openbmc/qemu/accel/xen/xen-all.c
/openbmc/qemu/backends/iommufd.c
/openbmc/qemu/block.c
/openbmc/qemu/block/copy-before-write.c
/openbmc/qemu/block/nbd.c
/openbmc/qemu/block/nvme.c
/openbmc/qemu/block/qcow2-bitmap.c
/openbmc/qemu/block/qcow2.c
/openbmc/qemu/block/qed.c
/openbmc/qemu/block/snapshot.c
/openbmc/qemu/block/vdi.c
/openbmc/qemu/block/vmdk.c
/openbmc/qemu/blockdev.c
/openbmc/qemu/bsd-user/bsd-file.h
/openbmc/qemu/bsd-user/freebsd/os-proc.h
/openbmc/qemu/bsd-user/main.c
/openbmc/qemu/bsd-user/qemu.h
/openbmc/qemu/bsd-user/signal.c
/openbmc/qemu/chardev/char-fe.c
/openbmc/qemu/configs/devices/mips-softmmu/common.mak
/openbmc/qemu/configs/devices/mips64el-softmmu/default.mak
/openbmc/qemu/contrib/plugins/hotblocks.c
/openbmc/qemu/contrib/plugins/howvec.c
/openbmc/qemu/disas/disas.c
/openbmc/qemu/disas/hppa.c
/openbmc/qemu/disas/riscv.c
/openbmc/qemu/docs/about/deprecated.rst
/openbmc/qemu/docs/about/removed-features.rst
/openbmc/qemu/docs/devel/acpi-bits.rst
/openbmc/qemu/docs/interop/firmware.json
/openbmc/qemu/docs/system/arm/b-l475e-iot01a.rst
/openbmc/qemu/docs/system/arm/emulation.rst
/openbmc/qemu/docs/system/arm/raspi.rst
/openbmc/qemu/gdbstub/gdbstub.c
/openbmc/qemu/gdbstub/internals.h
/openbmc/qemu/gdbstub/user-target.c
/openbmc/qemu/gdbstub/user.c
/openbmc/qemu/hmp-commands-info.hx
/openbmc/qemu/hw/acpi/aml-build.c
/openbmc/qemu/hw/arm/Kconfig
/openbmc/qemu/hw/arm/b-l475e-iot01a.c
/openbmc/qemu/hw/arm/bcm2835_peripherals.c
/openbmc/qemu/hw/arm/stm32l4x5_soc.c
/openbmc/qemu/hw/arm/virt-acpi-build.c
/openbmc/qemu/hw/arm/xen_arm.c
/openbmc/qemu/hw/block/virtio-blk.c
/openbmc/qemu/hw/char/pl011.c
/openbmc/qemu/hw/char/xen_console.c
/openbmc/qemu/hw/core/machine-smp.c
/openbmc/qemu/hw/core/qdev-properties-system.c
/openbmc/qemu/hw/cxl/cxl-cdat.c
/openbmc/qemu/hw/cxl/cxl-host.c
/openbmc/qemu/hw/display/Kconfig
/openbmc/qemu/hw/display/macfb.c
/openbmc/qemu/hw/gpio/Kconfig
/openbmc/qemu/hw/gpio/meson.build
/openbmc/qemu/hw/gpio/stm32l4x5_gpio.c
/openbmc/qemu/hw/gpio/trace-events
/openbmc/qemu/hw/hyperv/hv-balloon.c
/openbmc/qemu/hw/hyperv/hyperv.c
/openbmc/qemu/hw/hyperv/vmbus.c
/openbmc/qemu/hw/i2c/Kconfig
/openbmc/qemu/hw/i2c/bcm2835_i2c.c
/openbmc/qemu/hw/i2c/meson.build
/openbmc/qemu/hw/i386/meson.build
/openbmc/qemu/hw/i386/pc_piix.c
/openbmc/qemu/hw/i386/vapic.c
/openbmc/qemu/hw/i386/xen/meson.build
/openbmc/qemu/hw/i386/xen/xen-hvm.c
/openbmc/qemu/hw/intc/apic.c
/openbmc/qemu/hw/intc/grlib_irqmp.c
/openbmc/qemu/hw/intc/ioapic_common.c
/openbmc/qemu/hw/intc/riscv_aplic.c
/openbmc/qemu/hw/m68k/mcf5208.c
/openbmc/qemu/hw/mem/cxl_type3.c
/openbmc/qemu/hw/mips/Kconfig
/openbmc/qemu/hw/misc/Kconfig
/openbmc/qemu/hw/misc/meson.build
/openbmc/qemu/hw/misc/stm32l4x5_rcc.c
/openbmc/qemu/hw/misc/stm32l4x5_syscfg.c
/openbmc/qemu/hw/misc/trace-events
/openbmc/qemu/hw/misc/xlnx-versal-trng.c
/openbmc/qemu/hw/net/xen_nic.c
/openbmc/qemu/hw/pci-bridge/cxl_upstream.c
/openbmc/qemu/hw/pci/msi.c
/openbmc/qemu/hw/ppc/mac_newworld.c
/openbmc/qemu/hw/remote/remote-obj.c
/openbmc/qemu/hw/riscv/boot.c
/openbmc/qemu/hw/riscv/virt-acpi-build.c
/openbmc/qemu/hw/riscv/virt.c
/openbmc/qemu/hw/rtc/sun4v-rtc.c
/openbmc/qemu/hw/scsi/lsi53c895a.c
/openbmc/qemu/hw/scsi/trace-events
/openbmc/qemu/hw/scsi/vhost-scsi.c
/openbmc/qemu/hw/vfio/ap.c
/openbmc/qemu/hw/vfio/container.c
/openbmc/qemu/hw/vfio/helpers.c
/openbmc/qemu/hw/vfio/iommufd.c
/openbmc/qemu/hw/vfio/pci-quirks.c
/openbmc/qemu/hw/vfio/pci.c
/openbmc/qemu/hw/vfio/platform.c
/openbmc/qemu/hw/virtio/vhost-vsock.c
/openbmc/qemu/hw/virtio/vhost.c
/openbmc/qemu/hw/xen/xen-hvm-common.c
/openbmc/qemu/hw/xen/xen_pt.c
/openbmc/qemu/hw/xen/xen_pt.h
/openbmc/qemu/hw/xen/xen_pt_config_init.c
/openbmc/qemu/hw/xen/xen_pt_graphics.c
/openbmc/qemu/hw/xen/xen_pt_stub.c
/openbmc/qemu/include/disas/dis-asm.h
/openbmc/qemu/include/exec/cpu-all.h
/openbmc/qemu/include/exec/memattrs.h
/openbmc/qemu/include/gdbstub/user.h
/openbmc/qemu/include/hw/acpi/acpi-defs.h
/openbmc/qemu/include/hw/acpi/aml-build.h
/openbmc/qemu/include/hw/arm/bcm2835_peripherals.h
/openbmc/qemu/include/hw/arm/stm32l4x5_soc.h
/openbmc/qemu/include/hw/core/cpu.h
/openbmc/qemu/include/hw/cxl/cxl_cdat.h
/openbmc/qemu/include/hw/gpio/stm32l4x5_gpio.h
/openbmc/qemu/include/hw/hyperv/dynmem-proto.h
/openbmc/qemu/include/hw/hyperv/hyperv.h
/openbmc/qemu/include/hw/i2c/bcm2835_i2c.h
/openbmc/qemu/include/hw/i386/pc.h
/openbmc/qemu/include/hw/misc/stm32l4x5_rcc.h
/openbmc/qemu/include/hw/misc/stm32l4x5_rcc_internals.h
/openbmc/qemu/include/hw/misc/stm32l4x5_syscfg.h
/openbmc/qemu/include/hw/qdev-properties-system.h
/openbmc/qemu/include/hw/rtc/sun4v-rtc.h
/openbmc/qemu/include/hw/xen/xen-hvm-common.h
/openbmc/qemu/include/hw/xen/xen_igd.h
/openbmc/qemu/include/qapi/error.h
/openbmc/qemu/include/qapi/qmp/qerror.h
/openbmc/qemu/include/qemu/atomic.h
/openbmc/qemu/include/qemu/plugin.h
/openbmc/qemu/include/qemu/qemu-plugin.h
/openbmc/qemu/include/standard-headers/drm/drm_fourcc.h
/openbmc/qemu/include/standard-headers/linux/ethtool.h
/openbmc/qemu/include/standard-headers/linux/virtio_config.h
/openbmc/qemu/include/standard-headers/linux/virtio_pci.h
/openbmc/qemu/include/standard-headers/linux/virtio_pmem.h
/openbmc/qemu/include/sysemu/xen-mapcache.h
/openbmc/qemu/include/sysemu/xen.h
/openbmc/qemu/include/user/safe-syscall.h
/openbmc/qemu/linux-headers/asm-generic/unistd.h
/openbmc/qemu/linux-headers/asm-mips/mman.h
/openbmc/qemu/linux-headers/asm-mips/unistd_n32.h
/openbmc/qemu/linux-headers/asm-mips/unistd_n64.h
/openbmc/qemu/linux-headers/asm-mips/unistd_o32.h
/openbmc/qemu/linux-headers/asm-powerpc/unistd_32.h
/openbmc/qemu/linux-headers/asm-powerpc/unistd_64.h
/openbmc/qemu/linux-headers/asm-riscv/kvm.h
/openbmc/qemu/linux-headers/asm-s390/unistd_32.h
/openbmc/qemu/linux-headers/asm-s390/unistd_64.h
/openbmc/qemu/linux-headers/asm-x86/kvm.h
/openbmc/qemu/linux-headers/asm-x86/unistd_32.h
/openbmc/qemu/linux-headers/asm-x86/unistd_64.h
/openbmc/qemu/linux-headers/asm-x86/unistd_x32.h
/openbmc/qemu/linux-headers/linux/iommufd.h
/openbmc/qemu/linux-headers/linux/kvm.h
/openbmc/qemu/linux-headers/linux/userfaultfd.h
/openbmc/qemu/linux-headers/linux/vfio.h
/openbmc/qemu/linux-user/aarch64/cpu_loop.c
/openbmc/qemu/linux-user/arm/cpu_loop.c
/openbmc/qemu/linux-user/arm/signal.c
/openbmc/qemu/linux-user/cris/cpu_loop.c
/openbmc/qemu/linux-user/elfload.c
/openbmc/qemu/linux-user/hppa/signal.c
/openbmc/qemu/linux-user/linuxload.c
/openbmc/qemu/linux-user/m68k/cpu_loop.c
/openbmc/qemu/linux-user/m68k/target_cpu.h
/openbmc/qemu/linux-user/main.c
/openbmc/qemu/linux-user/mips/cpu_loop.c
/openbmc/qemu/linux-user/ppc/signal.c
/openbmc/qemu/linux-user/qemu.h
/openbmc/qemu/linux-user/riscv/cpu_loop.c
/openbmc/qemu/linux-user/signal-common.h
/openbmc/qemu/linux-user/signal.c
/openbmc/qemu/linux-user/syscall.c
/openbmc/qemu/linux-user/user-internals.h
/openbmc/qemu/linux-user/vm86.c
/openbmc/qemu/linux-user/xtensa/signal.c
/openbmc/qemu/meson.build
options.c
/openbmc/qemu/plugins/api.c
/openbmc/qemu/plugins/core.c
/openbmc/qemu/plugins/plugin.h
/openbmc/qemu/plugins/qemu-plugins.symbols
/openbmc/qemu/qapi/ui.json
/openbmc/qemu/qapi/virtio.json
/openbmc/qemu/qemu-options.hx
/openbmc/qemu/replay/replay.c
/openbmc/qemu/scripts/coverity-scan/run-coverity-scan
/openbmc/qemu/scripts/make-release
/openbmc/qemu/semihosting/arm-compat-semi.c
/openbmc/qemu/stubs/xen-hw-stub.c
/openbmc/qemu/system/physmem.c
/openbmc/qemu/system/qdev-monitor.c
/openbmc/qemu/system/vl.c
/openbmc/qemu/target/arm/cpu-features.h
/openbmc/qemu/target/arm/cpu.h
/openbmc/qemu/target/arm/helper.c
/openbmc/qemu/target/arm/internals.h
/openbmc/qemu/target/arm/meson.build
/openbmc/qemu/target/arm/ptw.c
/openbmc/qemu/target/arm/tcg/cpu-v7m.c
/openbmc/qemu/target/arm/tcg/cpu32.c
/openbmc/qemu/target/arm/tcg/cpu64.c
/openbmc/qemu/target/arm/tcg/hflags.c
/openbmc/qemu/target/arm/tcg/meson.build
/openbmc/qemu/target/arm/tcg/sme_helper.c
/openbmc/qemu/target/arm/tcg/translate.c
/openbmc/qemu/target/arm/trace-events
/openbmc/qemu/target/i386/kvm/hyperv-stub.c
/openbmc/qemu/target/i386/kvm/hyperv.c
/openbmc/qemu/target/i386/kvm/hyperv.h
/openbmc/qemu/target/i386/kvm/kvm.c
/openbmc/qemu/target/i386/sev.c
/openbmc/qemu/target/loongarch/disas.c
/openbmc/qemu/target/riscv/cpu.c
/openbmc/qemu/target/riscv/cpu.h
/openbmc/qemu/target/riscv/cpu_cfg.h
/openbmc/qemu/target/riscv/cpu_helper.c
/openbmc/qemu/target/riscv/csr.c
/openbmc/qemu/target/riscv/insn_trans/trans_rva.c.inc
/openbmc/qemu/target/riscv/insn_trans/trans_rvi.c.inc
/openbmc/qemu/target/riscv/insn_trans/trans_rvv.c.inc
/openbmc/qemu/target/riscv/insn_trans/trans_rvzce.c.inc
/openbmc/qemu/target/riscv/kvm/kvm-cpu.c
/openbmc/qemu/target/riscv/machine.c
/openbmc/qemu/target/riscv/pmu.h
/openbmc/qemu/target/riscv/tcg/tcg-cpu.c
/openbmc/qemu/target/riscv/translate.c
/openbmc/qemu/target/riscv/vector_helper.c
/openbmc/qemu/target/sparc/mmu_helper.c
/openbmc/qemu/tests/plugin/bb.c
/openbmc/qemu/tests/plugin/inline.c
/openbmc/qemu/tests/plugin/insn.c
/openbmc/qemu/tests/plugin/mem.c
/openbmc/qemu/tests/plugin/meson.build
/openbmc/qemu/tests/qtest/bcm2835-i2c-test.c
/openbmc/qemu/tests/qtest/libqos/meson.build
/openbmc/qemu/tests/qtest/libqos/qgraph.h
/openbmc/qemu/tests/qtest/libqos/riscv-virt-machine.c
/openbmc/qemu/tests/qtest/meson.build
/openbmc/qemu/tests/qtest/stm32l4x5_gpio-test.c
/openbmc/qemu/tests/qtest/stm32l4x5_rcc-test.c
/openbmc/qemu/tests/tcg/Makefile.target
/openbmc/qemu/tests/tcg/aarch64/Makefile.target
/openbmc/qemu/tests/tcg/aarch64/sme-smopa-1.c
/openbmc/qemu/tests/tcg/aarch64/sme-smopa-2.c
/openbmc/qemu/tests/tcg/multiarch/Makefile.target
/openbmc/qemu/tests/tcg/multiarch/follow-fork-mode.c
/openbmc/qemu/tests/tcg/multiarch/gdbstub/follow-fork-mode-child.py
/openbmc/qemu/tests/tcg/multiarch/gdbstub/follow-fork-mode-parent.py
/openbmc/qemu/tests/tcg/riscv64/Makefile.target
/openbmc/qemu/tests/unit/test-smp-parse.c
/openbmc/qemu/ui/cocoa.m
/openbmc/qemu/util/oslib-posix.c
70c25c9211-Mar-2024 Hao Xiang <hao.xiang@bytedance.com>

migration/multifd: Enable multifd zero page checking by default.

1. Set default "zero-page-detection" option to "multifd". Now
zero page checking can be done in the multifd threads and this
becomes

migration/multifd: Enable multifd zero page checking by default.

1. Set default "zero-page-detection" option to "multifd". Now
zero page checking can be done in the multifd threads and this
becomes the default configuration.
2. Handle migration QEMU9.0 -> QEMU8.2 compatibility. We provide
backward compatibility where zero page checking is done from the
migration main thread.

Signed-off-by: Hao Xiang <hao.xiang@bytedance.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20240311180015.3359271-7-hao.xiang@linux.dev
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

9ae90f7311-Mar-2024 Hao Xiang <hao.xiang@bytedance.com>

migration/multifd: Implement ram_save_target_page_multifd to handle multifd version of MigrationOps::ram_save_target_page.

1. Add a dedicated handler for MigrationOps::ram_save_target_page in
multif

migration/multifd: Implement ram_save_target_page_multifd to handle multifd version of MigrationOps::ram_save_target_page.

1. Add a dedicated handler for MigrationOps::ram_save_target_page in
multifd live migration.
2. Refactor ram_save_target_page_legacy so that the legacy and multifd
handlers don't have internal functions calling into each other.

Signed-off-by: Hao Xiang <hao.xiang@bytedance.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Message-Id: <20240226195654.934709-4-hao.xiang@bytedance.com>
Link: https://lore.kernel.org/r/20240311180015.3359271-6-hao.xiang@linux.dev
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

303e6f5411-Mar-2024 Hao Xiang <hao.xiang@bytedance.com>

migration/multifd: Implement zero page transmission on the multifd thread.

1. Add zero_pages field in MultiFDPacket_t.
2. Implements the zero page detection and handling on the multifd
threads for n

migration/multifd: Implement zero page transmission on the multifd thread.

1. Add zero_pages field in MultiFDPacket_t.
2. Implements the zero page detection and handling on the multifd
threads for non-compression, zlib and zstd compression backends.
3. Added a new value 'multifd' in ZeroPageDetection enumeration.
4. Adds zero page counters and updates multifd send/receive tracing
format to track the newly added counters.

Signed-off-by: Hao Xiang <hao.xiang@bytedance.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240311180015.3359271-5-hao.xiang@linux.dev
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

5fdbb1df11-Mar-2024 Hao Xiang <hao.xiang@bytedance.com>

migration/multifd: Add new migration option zero-page-detection.

This new parameter controls where the zero page checking is running.
1. If this parameter is set to 'legacy', zero page checking is
d

migration/multifd: Add new migration option zero-page-detection.

This new parameter controls where the zero page checking is running.
1. If this parameter is set to 'legacy', zero page checking is
done in the migration main thread.
2. If this parameter is set to 'none', zero page checking is disabled.

Signed-off-by: Hao Xiang <hao.xiang@bytedance.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Link: https://lore.kernel.org/r/20240311180015.3359271-4-hao.xiang@linux.dev
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

c3cdf3fb11-Mar-2024 Fabiano Rosas <farosas@suse.de>

migration/multifd: Allow clearing of the file_bmap from multifd

We currently only need to clear the mapped-ram file bitmap from the
migration thread during save_zero_page.

We're about to add suppor

migration/multifd: Allow clearing of the file_bmap from multifd

We currently only need to clear the mapped-ram file bitmap from the
migration thread during save_zero_page.

We're about to add support for zero page detection on the multifd
thread, so allow ramblock_set_file_bmap_atomic() to also clear the
bits.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240311180015.3359271-3-hao.xiang@linux.dev
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

44fe138e11-Mar-2024 Fabiano Rosas <farosas@suse.de>

migration/multifd: Allow zero pages in file migration

Currently, it's an error to have no data pages in the multifd file
migration because zero page detection is done in the migration thread
and zer

migration/multifd: Allow zero pages in file migration

Currently, it's an error to have no data pages in the multifd file
migration because zero page detection is done in the migration thread
and zero pages don't reach multifd. This is enforced with the
pages->num assert.

We're about to add zero page detection on the multifd thread. Fix the
file_write_ramblock_iov() to stop considering p->iovs_num=0 an error.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240311180015.3359271-2-hao.xiang@linux.dev
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

c9539d9b11-Mar-2024 Steve Sistare <steven.sistare@oracle.com>

migration: purge MigrationState from public interface

Move remaining MigrationState references from the public file
misc.h to the private file migration.h.

Signed-off-by: Steve Sistare <steven.sist

migration: purge MigrationState from public interface

Move remaining MigrationState references from the public file
misc.h to the private file migration.h.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lore.kernel.org/r/1710179338-294359-12-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

a3ed489311-Mar-2024 Steve Sistare <steven.sistare@oracle.com>

migration: delete unused accessors

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lore.kernel.org/r/1710179338-294359-11-git-send-email-steven.sistare@oracle.com
Signed-off-b

migration: delete unused accessors

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lore.kernel.org/r/1710179338-294359-11-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

7395127f11-Mar-2024 Steve Sistare <steven.sistare@oracle.com>

migration: privatize colo interfaces

Remove private migration interfaces from net/colo-compare.c and push them
to migration/colo.c.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: ht

migration: privatize colo interfaces

Remove private migration interfaces from net/colo-compare.c and push them
to migration/colo.c.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lore.kernel.org/r/1710179338-294359-10-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

20c64c8a11-Mar-2024 Steve Sistare <steven.sistare@oracle.com>

migration: migration_file_set_error

Define and export migration_file_set_error to eliminate a dependency
on MigrationState.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lo

migration: migration_file_set_error

Define and export migration_file_set_error to eliminate a dependency
on MigrationState.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lore.kernel.org/r/1710179338-294359-9-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

9bb630c611-Mar-2024 Steve Sistare <steven.sistare@oracle.com>

migration: migration_is_device

Define and export migration_is_device to eliminate a dependency
on MigrationState.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lore.kernel.

migration: migration_is_device

Define and export migration_is_device to eliminate a dependency
on MigrationState.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lore.kernel.org/r/1710179338-294359-8-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

6e78563911-Mar-2024 Steve Sistare <steven.sistare@oracle.com>

migration: migration_thread_is_self

Define and export migration_thread_is_self to eliminate a dependency
on MigrationState.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lo

migration: migration_thread_is_self

Define and export migration_thread_is_self to eliminate a dependency
on MigrationState.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lore.kernel.org/r/1710179338-294359-7-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

714f331211-Mar-2024 Steve Sistare <steven.sistare@oracle.com>

migration: export vcpu_dirty_limit_period

Define and export vcpu_dirty_limit_period to eliminate a dependency
on MigrationState.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: https

migration: export vcpu_dirty_limit_period

Define and export vcpu_dirty_limit_period to eliminate a dependency
on MigrationState.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lore.kernel.org/r/1710179338-294359-6-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

aeaafb1e11-Mar-2024 Steve Sistare <steven.sistare@oracle.com>

migration: export migration_is_running

Delete the MigrationState parameter from migration_is_running and move
it to the public API in misc.h.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com

migration: export migration_is_running

Delete the MigrationState parameter from migration_is_running and move
it to the public API in misc.h.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lore.kernel.org/r/1710179338-294359-5-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

3a6813b611-Mar-2024 Steve Sistare <steven.sistare@oracle.com>

migration: export migration_is_active

Delete the MigrationState parameter from migration_is_active so it
can be exported and used without including migration.h.

Signed-off-by: Steve Sistare <steven

migration: export migration_is_active

Delete the MigrationState parameter from migration_is_active so it
can be exported and used without including migration.h.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lore.kernel.org/r/1710179338-294359-4-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

7dcb3c8711-Mar-2024 Steve Sistare <steven.sistare@oracle.com>

migration: export migration_is_setup_or_active

Delete the MigrationState parameter from migration_is_setup_or_active
and move it to the public API in misc.h.

Signed-off-by: Steve Sistare <steven.si

migration: export migration_is_setup_or_active

Delete the MigrationState parameter from migration_is_setup_or_active
and move it to the public API in misc.h.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/r/1710179338-294359-3-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

f3bff6c411-Mar-2024 Steve Sistare <steven.sistare@oracle.com>

migration: export fewer options

A small number of migration options are accessed by migration clients,
but to see them clients must include all of options.h, which is mostly
for migration core code.

migration: export fewer options

A small number of migration options are accessed by migration clients,
but to see them clients must include all of options.h, which is mostly
for migration core code. migrate_mode() in particular will be needed by
multiple clients.

Refactor the option declarations so clients can see the necessary few via
misc.h, which already exports a portion of the client API.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lore.kernel.org/r/1710179319-294320-1-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

a1bb5dd111-Mar-2024 Anthony PERARD <anthony.perard@citrix.com>

migration: Fix format in error message

In file_write_ramblock_iov(), "offset" is "uintptr_t" and not
"ram_addr_t". While usually they are both equivalent, this is not the
case with CONFIG_XEN_BACKEN

migration: Fix format in error message

In file_write_ramblock_iov(), "offset" is "uintptr_t" and not
"ram_addr_t". While usually they are both equivalent, this is not the
case with CONFIG_XEN_BACKEND.

Use the right format. This will fix build on 32-bit.

Fixes: f427d90b9898 ("migration/multifd: Support outgoing mapped-ram stream format")
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Link: https://lore.kernel.org/r/20240311123439.16844-1-anthony.perard@citrix.com
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

69f7b00d06-Mar-2024 Yu Zhang <yu.zhang@ionos.com>

migration/rdma: Fix a memory issue for migration

In commit 3fa9642ff7 change was made to convert the RDMA backend to
accept MigrateAddress struct. However, the assignment of "host" leads
to data cor

migration/rdma: Fix a memory issue for migration

In commit 3fa9642ff7 change was made to convert the RDMA backend to
accept MigrateAddress struct. However, the assignment of "host" leads
to data corruption on the target host and the failure of migration.

isock->host = rdma->host;

By allocating the memory explicitly for it with g_strdup_printf(), the
issue is fixed and the migration doesn't fail any more.

Fixes: 3fa9642ff7 ("migration: convert rdma backend to accept MigrateAddress")
Cc: qemu-stable <qemu-stable@nongnu.org>
Cc: Li Zhijian <lizhijian@fujitsu.com>
Link: https://lore.kernel.org/r/CAHEcVy4L_D6tuhJ8h=xLR4WaPaprJE3nnxZAEyUnoTrxQ6CF5w@mail.gmail.com
Signed-off-by: Yu Zhang <yu.zhang@ionos.com>
[peterx: use g_strdup() instead of g_strdup_printf(), per Zhijian]
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

61dec06005-Mar-2024 Fabiano Rosas <farosas@suse.de>

migration/multifd: Don't fsync when closing QIOChannelFile

Commit bc38feddeb ("io: fsync before closing a file channel") added a
fsync/fdatasync at the closing point of the QIOChannelFile to ensure

migration/multifd: Don't fsync when closing QIOChannelFile

Commit bc38feddeb ("io: fsync before closing a file channel") added a
fsync/fdatasync at the closing point of the QIOChannelFile to ensure
integrity of the migration stream in case of QEMU crash.

The decision to do the sync at qio_channel_close() was not the best
since that function runs in the main thread and the fsync can cause
QEMU to hang for several minutes, depending on the migration size and
disk speed.

To fix the hang, remove the fsync from qio_channel_file_close().

At this moment, the migration code is the only user of the fsync and
we're taking the tradeoff of not having a sync at all, leaving the
responsibility to the upper layers.

Fixes: bc38feddeb ("io: fsync before closing a file channel")
Reviewed-by: "Daniel P. Berrangé" <berrange@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240305195629.9922-1-farosas@suse.de
Link: https://lore.kernel.org/r/20240305174332.2553-1-farosas@suse.de
[peterx: add more comment to the qio_channel_close()]
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

e6e08e8304-Mar-2024 Cédric Le Goater <clg@redhat.com>

migration: Do not call PRECOPY_NOTIFY_SETUP notifiers in case of error

When commit bd2270608fa0 ("migration/ram.c: add a notifier chain for
precopy") added PRECOPY_NOTIFY_SETUP notifiers at the end

migration: Do not call PRECOPY_NOTIFY_SETUP notifiers in case of error

When commit bd2270608fa0 ("migration/ram.c: add a notifier chain for
precopy") added PRECOPY_NOTIFY_SETUP notifiers at the end of
qemu_savevm_state_setup(), it didn't take into account a possible
error in the loop calling vmstate_save() or .save_setup() handlers.

Check ret value before calling the notifiers.

Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20240304122844.1888308-10-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

e8c4436304-Mar-2024 Cédric Le Goater <clg@redhat.com>

migration: Report error when shutdown fails

This will help detect issues regarding I/O channels usage.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Xu <peterx@redhat.c

migration: Report error when shutdown fails

This will help detect issues regarding I/O channels usage.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20240304122844.1888308-7-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>

show more ...

12345678910>>...90