]>
Commit | Line | Data |
---|---|---|
1f0776f1 JQ |
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 | ||
5e804644 JQ |
36 | bool migrate_colo(void) |
37 | { | |
38 | MigrationState *s = migrate_get_current(); | |
39 | return s->capabilities[MIGRATION_CAPABILITY_X_COLO]; | |
40 | } | |
41 | ||
a7a94d14 JQ |
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 | ||
1f0776f1 JQ |
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_ignore_shared(void) | |
61 | { | |
62 | MigrationState *s; | |
63 | ||
64 | s = migrate_get_current(); | |
65 | ||
66 | return s->capabilities[MIGRATION_CAPABILITY_X_IGNORE_SHARED]; | |
67 | } | |
68 | ||
69 | bool migrate_late_block_activate(void) | |
70 | { | |
71 | MigrationState *s; | |
72 | ||
73 | s = migrate_get_current(); | |
74 | ||
75 | return s->capabilities[MIGRATION_CAPABILITY_LATE_BLOCK_ACTIVATE]; | |
76 | } | |
77 | ||
78 | bool migrate_pause_before_switchover(void) | |
79 | { | |
80 | MigrationState *s; | |
81 | ||
82 | s = migrate_get_current(); | |
83 | ||
84 | return s->capabilities[MIGRATION_CAPABILITY_PAUSE_BEFORE_SWITCHOVER]; | |
85 | } | |
86 | ||
87 | bool migrate_postcopy_blocktime(void) | |
88 | { | |
89 | MigrationState *s; | |
90 | ||
91 | s = migrate_get_current(); | |
92 | ||
93 | return s->capabilities[MIGRATION_CAPABILITY_POSTCOPY_BLOCKTIME]; | |
94 | } | |
95 | ||
96 | bool migrate_postcopy_preempt(void) | |
97 | { | |
98 | MigrationState *s; | |
99 | ||
100 | s = migrate_get_current(); | |
101 | ||
102 | return s->capabilities[MIGRATION_CAPABILITY_POSTCOPY_PREEMPT]; | |
103 | } | |
104 | ||
105 | bool migrate_postcopy_ram(void) | |
106 | { | |
107 | MigrationState *s; | |
108 | ||
109 | s = migrate_get_current(); | |
110 | ||
111 | return s->capabilities[MIGRATION_CAPABILITY_POSTCOPY_RAM]; | |
112 | } | |
113 | ||
114 | bool migrate_release_ram(void) | |
115 | { | |
116 | MigrationState *s; | |
117 | ||
118 | s = migrate_get_current(); | |
119 | ||
120 | return s->capabilities[MIGRATION_CAPABILITY_RELEASE_RAM]; | |
121 | } | |
122 | ||
123 | bool migrate_validate_uuid(void) | |
124 | { | |
125 | MigrationState *s; | |
126 | ||
127 | s = migrate_get_current(); | |
128 | ||
129 | return s->capabilities[MIGRATION_CAPABILITY_VALIDATE_UUID]; | |
130 | } | |
131 | ||
132 | bool migrate_zero_blocks(void) | |
133 | { | |
134 | MigrationState *s; | |
135 | ||
136 | s = migrate_get_current(); | |
137 | ||
138 | return s->capabilities[MIGRATION_CAPABILITY_ZERO_BLOCKS]; | |
139 | } |