| 1 | /* |
| 2 | * QEMU migration capabilities |
| 3 | * |
| 4 | * Copyright (c) 2012-2023 Red Hat Inc |
| 5 | * |
| 6 | * Authors: |
| 7 | * Orit Wasserman <owasserm@redhat.com> |
| 8 | * Juan Quintela <quintela@redhat.com> |
| 9 | * |
| 10 | * This work is licensed under the terms of the GNU GPL, version 2 or later. |
| 11 | * See the COPYING file in the top-level directory. |
| 12 | */ |
| 13 | |
| 14 | #ifndef QEMU_MIGRATION_OPTIONS_H |
| 15 | #define QEMU_MIGRATION_OPTIONS_H |
| 16 | |
| 17 | #include "hw/core/qdev-properties.h" |
| 18 | #include "hw/core/qdev-properties-system.h" |
| 19 | #include "migration/client-options.h" |
| 20 | |
| 21 | /* migration properties */ |
| 22 | |
| 23 | extern const Property migration_properties[]; |
| 24 | extern const size_t migration_properties_count; |
| 25 | |
| 26 | /* capabilities */ |
| 27 | |
| 28 | bool migrate_auto_converge(void); |
| 29 | bool migrate_colo(void); |
| 30 | bool migrate_dirty_bitmaps(void); |
| 31 | bool migrate_events(void); |
| 32 | bool migrate_mapped_ram(void); |
| 33 | bool migrate_ignore_shared(void); |
| 34 | bool migrate_late_block_activate(void); |
| 35 | bool migrate_multifd(void); |
| 36 | bool migrate_pause_before_switchover(void); |
| 37 | bool migrate_postcopy_blocktime(void); |
| 38 | bool migrate_postcopy_preempt(void); |
| 39 | bool migrate_rdma_pin_all(void); |
| 40 | bool migrate_release_ram(void); |
| 41 | bool migrate_return_path(void); |
| 42 | bool migrate_validate_uuid(void); |
| 43 | bool migrate_xbzrle(void); |
| 44 | bool migrate_zero_copy_send(void); |
| 45 | |
| 46 | /* |
| 47 | * pseudo capabilities |
| 48 | * |
| 49 | * These are functions that are used in a similar way to capabilities |
| 50 | * check, but they are not a capability. |
| 51 | */ |
| 52 | |
| 53 | bool migrate_multifd_flush_after_each_section(void); |
| 54 | bool migrate_postcopy(void); |
| 55 | bool migrate_rdma(void); |
| 56 | bool migrate_tls(void); |
| 57 | |
| 58 | /* capabilities helpers */ |
| 59 | |
| 60 | bool migrate_rdma_caps_check(bool *caps, Error **errp); |
| 61 | bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp); |
| 62 | bool migrate_can_snapshot(Error **errp); |
| 63 | |
| 64 | /* parameters */ |
| 65 | |
| 66 | const BitmapMigrationNodeAliasList *migrate_block_bitmap_mapping(void); |
| 67 | bool migrate_has_block_bitmap_mapping(void); |
| 68 | |
| 69 | uint32_t migrate_checkpoint_delay(void); |
| 70 | uint8_t migrate_cpu_throttle_increment(void); |
| 71 | uint8_t migrate_cpu_throttle_initial(void); |
| 72 | bool migrate_cpu_throttle_tailslow(void); |
| 73 | bool migrate_direct_io(void); |
| 74 | uint64_t migrate_downtime_limit(void); |
| 75 | uint8_t migrate_max_cpu_throttle(void); |
| 76 | uint64_t migrate_max_bandwidth(void); |
| 77 | uint64_t migrate_avail_switchover_bandwidth(void); |
| 78 | uint64_t migrate_max_postcopy_bandwidth(void); |
| 79 | int migrate_multifd_channels(void); |
| 80 | MultiFDCompression migrate_multifd_compression(void); |
| 81 | int migrate_multifd_zlib_level(void); |
| 82 | int migrate_multifd_qatzip_level(void); |
| 83 | int migrate_multifd_zstd_level(void); |
| 84 | uint8_t migrate_throttle_trigger_threshold(void); |
| 85 | const char *migrate_tls_authz(void); |
| 86 | const char *migrate_tls_creds(void); |
| 87 | const char *migrate_tls_hostname(void); |
| 88 | uint64_t migrate_xbzrle_cache_size(void); |
| 89 | ZeroPageDetection migrate_zero_page_detection(void); |
| 90 | uint64_t migrate_rdma_chunk_size(void); |
| 91 | |
| 92 | /* parameters helpers */ |
| 93 | |
| 94 | bool migrate_params_check(MigrationParameters *params, Error **errp); |
| 95 | void migrate_params_init(MigrationParameters *params); |
| 96 | void migrate_tls_opts_free(MigrationParameters *params); |
| 97 | #endif |