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 #include "qemu/osdep.h" 15 #include "migration.h" 16 #include "options.h" 17 18 bool migrate_auto_converge(void) 19 { 20 MigrationState *s; 21 22 s = migrate_get_current(); 23 24 return s->capabilities[MIGRATION_CAPABILITY_AUTO_CONVERGE]; 25 } 26 27 bool migrate_background_snapshot(void) 28 { 29 MigrationState *s; 30 31 s = migrate_get_current(); 32 33 return s->capabilities[MIGRATION_CAPABILITY_BACKGROUND_SNAPSHOT]; 34 } 35 36 bool migrate_colo(void) 37 { 38 MigrationState *s = migrate_get_current(); 39 return s->capabilities[MIGRATION_CAPABILITY_X_COLO]; 40 } 41 42 bool migrate_compress(void) 43 { 44 MigrationState *s; 45 46 s = migrate_get_current(); 47 48 return s->capabilities[MIGRATION_CAPABILITY_COMPRESS]; 49 } 50 51 bool migrate_dirty_bitmaps(void) 52 { 53 MigrationState *s; 54 55 s = migrate_get_current(); 56 57 return s->capabilities[MIGRATION_CAPABILITY_DIRTY_BITMAPS]; 58 } 59 60 bool migrate_events(void) 61 { 62 MigrationState *s; 63 64 s = migrate_get_current(); 65 66 return s->capabilities[MIGRATION_CAPABILITY_EVENTS]; 67 } 68 69 bool migrate_ignore_shared(void) 70 { 71 MigrationState *s; 72 73 s = migrate_get_current(); 74 75 return s->capabilities[MIGRATION_CAPABILITY_X_IGNORE_SHARED]; 76 } 77 78 bool migrate_late_block_activate(void) 79 { 80 MigrationState *s; 81 82 s = migrate_get_current(); 83 84 return s->capabilities[MIGRATION_CAPABILITY_LATE_BLOCK_ACTIVATE]; 85 } 86 87 bool migrate_multifd(void) 88 { 89 MigrationState *s; 90 91 s = migrate_get_current(); 92 93 return s->capabilities[MIGRATION_CAPABILITY_MULTIFD]; 94 } 95 96 bool migrate_pause_before_switchover(void) 97 { 98 MigrationState *s; 99 100 s = migrate_get_current(); 101 102 return s->capabilities[MIGRATION_CAPABILITY_PAUSE_BEFORE_SWITCHOVER]; 103 } 104 105 bool migrate_postcopy_blocktime(void) 106 { 107 MigrationState *s; 108 109 s = migrate_get_current(); 110 111 return s->capabilities[MIGRATION_CAPABILITY_POSTCOPY_BLOCKTIME]; 112 } 113 114 bool migrate_postcopy_preempt(void) 115 { 116 MigrationState *s; 117 118 s = migrate_get_current(); 119 120 return s->capabilities[MIGRATION_CAPABILITY_POSTCOPY_PREEMPT]; 121 } 122 123 bool migrate_postcopy_ram(void) 124 { 125 MigrationState *s; 126 127 s = migrate_get_current(); 128 129 return s->capabilities[MIGRATION_CAPABILITY_POSTCOPY_RAM]; 130 } 131 132 bool migrate_release_ram(void) 133 { 134 MigrationState *s; 135 136 s = migrate_get_current(); 137 138 return s->capabilities[MIGRATION_CAPABILITY_RELEASE_RAM]; 139 } 140 141 bool migrate_validate_uuid(void) 142 { 143 MigrationState *s; 144 145 s = migrate_get_current(); 146 147 return s->capabilities[MIGRATION_CAPABILITY_VALIDATE_UUID]; 148 } 149 150 bool migrate_xbzrle(void) 151 { 152 MigrationState *s; 153 154 s = migrate_get_current(); 155 156 return s->capabilities[MIGRATION_CAPABILITY_XBZRLE]; 157 } 158 159 bool migrate_zero_blocks(void) 160 { 161 MigrationState *s; 162 163 s = migrate_get_current(); 164 165 return s->capabilities[MIGRATION_CAPABILITY_ZERO_BLOCKS]; 166 } 167 168 bool migrate_zero_copy_send(void) 169 { 170 MigrationState *s; 171 172 s = migrate_get_current(); 173 174 return s->capabilities[MIGRATION_CAPABILITY_ZERO_COPY_SEND]; 175 } 176