target.c 594 B

12345678910111213141516171819202122232425
  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. #include "qemu/osdep.h"
  8. #include "qapi/qapi-types-migration.h"
  9. #include "migration.h"
  10. #include CONFIG_DEVICES
  11. #ifdef CONFIG_VFIO
  12. #include "hw/vfio/vfio-common.h"
  13. #endif
  14. void populate_vfio_info(MigrationInfo *info)
  15. {
  16. #ifdef CONFIG_VFIO
  17. if (vfio_mig_active()) {
  18. info->vfio = g_malloc0(sizeof(*info->vfio));
  19. info->vfio->transferred = vfio_mig_bytes_transferred();
  20. }
  21. #endif
  22. }