xref: /openbmc/qemu/migration/options.h (revision 40b44316)
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 #include "migration/client-options.h"
20 
21 /* migration properties */
22 
23 extern Property migration_properties[];
24 
25 /* capabilities */
26 
27 bool migrate_auto_converge(void);
28 bool migrate_colo(void);
29 bool migrate_dirty_bitmaps(void);
30 bool migrate_events(void);
31 bool migrate_mapped_ram(void);
32 bool migrate_ignore_shared(void);
33 bool migrate_late_block_activate(void);
34 bool migrate_multifd(void);
35 bool migrate_pause_before_switchover(void);
36 bool migrate_postcopy_blocktime(void);
37 bool migrate_postcopy_preempt(void);
38 bool migrate_rdma_pin_all(void);
39 bool migrate_release_ram(void);
40 bool migrate_return_path(void);
41 bool migrate_validate_uuid(void);
42 bool migrate_xbzrle(void);
43 bool migrate_zero_copy_send(void);
44 
45 /*
46  * pseudo capabilities
47  *
48  * These are functions that are used in a similar way to capabilities
49  * check, but they are not a capability.
50  */
51 
52 bool migrate_multifd_flush_after_each_section(void);
53 bool migrate_postcopy(void);
54 bool migrate_rdma(void);
55 bool migrate_tls(void);
56 
57 /* capabilities helpers */
58 
59 bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp);
60 
61 /* parameters */
62 
63 const BitmapMigrationNodeAliasList *migrate_block_bitmap_mapping(void);
64 bool migrate_has_block_bitmap_mapping(void);
65 
66 uint32_t migrate_checkpoint_delay(void);
67 uint8_t migrate_cpu_throttle_increment(void);
68 uint8_t migrate_cpu_throttle_initial(void);
69 bool migrate_cpu_throttle_tailslow(void);
70 bool migrate_direct_io(void);
71 uint64_t migrate_downtime_limit(void);
72 uint8_t migrate_max_cpu_throttle(void);
73 uint64_t migrate_max_bandwidth(void);
74 uint64_t migrate_avail_switchover_bandwidth(void);
75 uint64_t migrate_max_postcopy_bandwidth(void);
76 int migrate_multifd_channels(void);
77 MultiFDCompression migrate_multifd_compression(void);
78 int migrate_multifd_zlib_level(void);
79 int migrate_multifd_qatzip_level(void);
80 int migrate_multifd_zstd_level(void);
81 uint8_t migrate_throttle_trigger_threshold(void);
82 const char *migrate_tls_authz(void);
83 const char *migrate_tls_creds(void);
84 const char *migrate_tls_hostname(void);
85 uint64_t migrate_xbzrle_cache_size(void);
86 ZeroPageDetection migrate_zero_page_detection(void);
87 
88 /* parameters helpers */
89 
90 bool migrate_params_check(MigrationParameters *params, Error **errp);
91 void migrate_params_init(MigrationParameters *params);
92 #endif
93