]> git.proxmox.com Git - mirror_qemu.git/blame - migration/target.c
Merge tag 'migration-20240126-pull-request' of https://gitlab.com/peterx/qemu into...
[mirror_qemu.git] / migration / target.c
CommitLineData
43bd0bf3
TH
1/*
2 * QEMU live migration - functions that need to be compiled target-specific
3 *
4 * This work is licensed under the terms of the GNU GPL, version 2
5 * or (at your option) any later version.
6 */
7
8#include "qemu/osdep.h"
9#include "qapi/qapi-types-migration.h"
10#include "migration.h"
fa76c854 11#include CONFIG_DEVICES
43bd0bf3
TH
12
13#ifdef CONFIG_VFIO
14#include "hw/vfio/vfio-common.h"
15#endif
16
808642a2 17#ifdef CONFIG_VFIO
38c482b4 18void migration_populate_vfio_info(MigrationInfo *info)
43bd0bf3 19{
43bd0bf3 20 if (vfio_mig_active()) {
43bd0bf3
TH
21 info->vfio = g_malloc0(sizeof(*info->vfio));
22 info->vfio->transferred = vfio_mig_bytes_transferred();
23 }
43bd0bf3 24}
808642a2 25
38c482b4 26void migration_reset_vfio_bytes_transferred(void)
808642a2
AH
27{
28 vfio_reset_bytes_transferred();
29}
30#else
38c482b4 31void migration_populate_vfio_info(MigrationInfo *info)
808642a2
AH
32{
33}
34
38c482b4 35void migration_reset_vfio_bytes_transferred(void)
808642a2
AH
36{
37}
38#endif