xref: /openbmc/qemu/migration/options.h (revision 136cb9cc)
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/qdev-properties.h"
18 #include "hw/qdev-properties-system.h"
19 
20 /* migration properties */
21 
22 extern Property migration_properties[];
23 
24 /* capabilities */
25 
26 bool migrate_auto_converge(void);
27 bool migrate_background_snapshot(void);
28 bool migrate_block(void);
29 bool migrate_colo(void);
30 bool migrate_compress(void);
31 bool migrate_dirty_bitmaps(void);
32 bool migrate_dirty_limit(void);
33 bool migrate_events(void);
34 bool migrate_ignore_shared(void);
35 bool migrate_late_block_activate(void);
36 bool migrate_multifd(void);
37 bool migrate_pause_before_switchover(void);
38 bool migrate_postcopy_blocktime(void);
39 bool migrate_postcopy_preempt(void);
40 bool migrate_postcopy_ram(void);
41 bool migrate_rdma_pin_all(void);
42 bool migrate_release_ram(void);
43 bool migrate_return_path(void);
44 bool migrate_switchover_ack(void);
45 bool migrate_validate_uuid(void);
46 bool migrate_xbzrle(void);
47 bool migrate_zero_blocks(void);
48 bool migrate_zero_copy_send(void);
49 
50 /*
51  * pseudo capabilities
52  *
53  * These are functions that are used in a similar way to capabilities
54  * check, but they are not a capability.
55  */
56 
57 bool migrate_multifd_flush_after_each_section(void);
58 bool migrate_postcopy(void);
59 bool migrate_tls(void);
60 
61 /* capabilities helpers */
62 
63 bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp);
64 bool migrate_cap_set(int cap, bool value, Error **errp);
65 
66 /* parameters */
67 
68 const BitmapMigrationNodeAliasList *migrate_block_bitmap_mapping(void);
69 bool migrate_has_block_bitmap_mapping(void);
70 
71 bool migrate_block_incremental(void);
72 uint32_t migrate_checkpoint_delay(void);
73 int migrate_compress_level(void);
74 int migrate_compress_threads(void);
75 int migrate_compress_wait_thread(void);
76 uint8_t migrate_cpu_throttle_increment(void);
77 uint8_t migrate_cpu_throttle_initial(void);
78 bool migrate_cpu_throttle_tailslow(void);
79 int migrate_decompress_threads(void);
80 uint64_t migrate_downtime_limit(void);
81 uint8_t migrate_max_cpu_throttle(void);
82 uint64_t migrate_max_bandwidth(void);
83 uint64_t migrate_max_postcopy_bandwidth(void);
84 int migrate_multifd_channels(void);
85 MultiFDCompression migrate_multifd_compression(void);
86 int migrate_multifd_zlib_level(void);
87 int migrate_multifd_zstd_level(void);
88 uint8_t migrate_throttle_trigger_threshold(void);
89 const char *migrate_tls_authz(void);
90 const char *migrate_tls_creds(void);
91 const char *migrate_tls_hostname(void);
92 uint64_t migrate_xbzrle_cache_size(void);
93 
94 /* parameters setters */
95 
96 void migrate_set_block_incremental(bool value);
97 
98 /* parameters helpers */
99 
100 bool migrate_params_check(MigrationParameters *params, Error **errp);
101 void migrate_params_init(MigrationParameters *params);
102 void block_cleanup_parameters(void);
103 
104 #endif
105