2023-03-02 04:18:45 +08:00
|
|
|
/*
|
|
|
|
* QEMU migration capabilities
|
|
|
|
*
|
|
|
|
* Copyright (c) 2012-2023 Red Hat Inc
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Orit Wasserman <owasserm@redhat.com>
|
|
|
|
* Juan Quintela <quintela@redhat.com>
|
|
|
|
*
|
|
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
|
|
* See the COPYING file in the top-level directory.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QEMU_MIGRATION_OPTIONS_H
|
|
|
|
#define QEMU_MIGRATION_OPTIONS_H
|
|
|
|
|
2023-03-02 19:55:57 +08:00
|
|
|
#include "hw/qdev-properties.h"
|
|
|
|
#include "hw/qdev-properties-system.h"
|
|
|
|
|
2023-03-02 17:13:16 +08:00
|
|
|
/* constants */
|
|
|
|
|
|
|
|
/* Amount of time to allocate to each "chunk" of bandwidth-throttled
|
|
|
|
* data. */
|
|
|
|
#define BUFFER_DELAY 100
|
|
|
|
#define XFER_LIMIT_RATIO (1000 / BUFFER_DELAY)
|
|
|
|
|
2023-03-02 19:55:57 +08:00
|
|
|
/* migration properties */
|
|
|
|
|
|
|
|
extern Property migration_properties[];
|
|
|
|
|
2023-03-02 04:18:45 +08:00
|
|
|
/* capabilities */
|
|
|
|
|
|
|
|
bool migrate_auto_converge(void);
|
|
|
|
bool migrate_background_snapshot(void);
|
2023-03-02 05:23:57 +08:00
|
|
|
bool migrate_block(void);
|
2023-03-02 05:00:16 +08:00
|
|
|
bool migrate_colo(void);
|
2023-03-02 05:03:48 +08:00
|
|
|
bool migrate_compress(void);
|
2023-03-02 04:18:45 +08:00
|
|
|
bool migrate_dirty_bitmaps(void);
|
2023-03-02 05:08:09 +08:00
|
|
|
bool migrate_events(void);
|
2023-03-02 04:18:45 +08:00
|
|
|
bool migrate_ignore_shared(void);
|
|
|
|
bool migrate_late_block_activate(void);
|
2023-03-02 05:10:29 +08:00
|
|
|
bool migrate_multifd(void);
|
2023-03-02 04:18:45 +08:00
|
|
|
bool migrate_pause_before_switchover(void);
|
|
|
|
bool migrate_postcopy_blocktime(void);
|
|
|
|
bool migrate_postcopy_preempt(void);
|
|
|
|
bool migrate_postcopy_ram(void);
|
2023-03-02 05:41:55 +08:00
|
|
|
bool migrate_rdma_pin_all(void);
|
2023-03-02 04:18:45 +08:00
|
|
|
bool migrate_release_ram(void);
|
2023-03-02 05:25:47 +08:00
|
|
|
bool migrate_return_path(void);
|
2023-03-02 04:18:45 +08:00
|
|
|
bool migrate_validate_uuid(void);
|
2023-03-02 05:20:13 +08:00
|
|
|
bool migrate_xbzrle(void);
|
2023-03-02 04:18:45 +08:00
|
|
|
bool migrate_zero_blocks(void);
|
2023-03-02 05:17:14 +08:00
|
|
|
bool migrate_zero_copy_send(void);
|
2023-03-02 04:18:45 +08:00
|
|
|
|
2023-03-02 17:44:20 +08:00
|
|
|
/*
|
|
|
|
* pseudo capabilities
|
|
|
|
*
|
|
|
|
* These are functions that are used in a similar way to capabilities
|
|
|
|
* check, but they are not a capability.
|
|
|
|
*/
|
|
|
|
|
2022-06-21 18:13:14 +08:00
|
|
|
bool migrate_multifd_flush_after_each_section(void);
|
2023-03-02 17:44:20 +08:00
|
|
|
bool migrate_postcopy(void);
|
2023-03-02 17:41:23 +08:00
|
|
|
bool migrate_tls(void);
|
2023-03-02 17:44:20 +08:00
|
|
|
|
2023-03-02 06:05:53 +08:00
|
|
|
/* capabilities helpers */
|
|
|
|
|
|
|
|
bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp);
|
2023-03-02 06:25:44 +08:00
|
|
|
bool migrate_cap_set(int cap, bool value, Error **errp);
|
2023-03-02 06:05:53 +08:00
|
|
|
|
2023-03-02 07:39:03 +08:00
|
|
|
/* parameters */
|
|
|
|
|
2023-03-02 19:49:16 +08:00
|
|
|
const BitmapMigrationNodeAliasList *migrate_block_bitmap_mapping(void);
|
2023-03-02 07:49:47 +08:00
|
|
|
bool migrate_block_incremental(void);
|
2023-03-02 08:04:55 +08:00
|
|
|
uint32_t migrate_checkpoint_delay(void);
|
2023-03-02 07:39:03 +08:00
|
|
|
int migrate_compress_level(void);
|
|
|
|
int migrate_compress_threads(void);
|
|
|
|
int migrate_compress_wait_thread(void);
|
2023-03-02 17:20:49 +08:00
|
|
|
uint8_t migrate_cpu_throttle_increment(void);
|
2023-03-02 08:22:44 +08:00
|
|
|
uint8_t migrate_cpu_throttle_initial(void);
|
2023-03-02 17:29:51 +08:00
|
|
|
bool migrate_cpu_throttle_tailslow(void);
|
2023-03-02 07:39:03 +08:00
|
|
|
int migrate_decompress_threads(void);
|
2023-03-02 19:00:43 +08:00
|
|
|
uint64_t migrate_downtime_limit(void);
|
2023-03-02 08:13:01 +08:00
|
|
|
uint8_t migrate_max_cpu_throttle(void);
|
2023-03-02 18:00:12 +08:00
|
|
|
uint64_t migrate_max_bandwidth(void);
|
2023-03-02 07:39:03 +08:00
|
|
|
int64_t migrate_max_postcopy_bandwidth(void);
|
|
|
|
int migrate_multifd_channels(void);
|
|
|
|
MultiFDCompression migrate_multifd_compression(void);
|
|
|
|
int migrate_multifd_zlib_level(void);
|
|
|
|
int migrate_multifd_zstd_level(void);
|
2023-03-02 07:59:13 +08:00
|
|
|
uint8_t migrate_throttle_trigger_threshold(void);
|
2023-03-02 19:33:50 +08:00
|
|
|
const char *migrate_tls_authz(void);
|
2023-03-02 19:17:06 +08:00
|
|
|
const char *migrate_tls_creds(void);
|
2023-03-02 19:37:21 +08:00
|
|
|
const char *migrate_tls_hostname(void);
|
2023-03-02 07:39:03 +08:00
|
|
|
uint64_t migrate_xbzrle_cache_size(void);
|
|
|
|
|
2023-03-02 19:05:03 +08:00
|
|
|
/* parameters setters */
|
|
|
|
|
|
|
|
void migrate_set_block_incremental(bool value);
|
|
|
|
|
2023-03-02 17:13:16 +08:00
|
|
|
/* parameters helpers */
|
|
|
|
|
|
|
|
bool migrate_params_check(MigrationParameters *params, Error **errp);
|
2023-03-02 17:35:24 +08:00
|
|
|
void migrate_params_init(MigrationParameters *params);
|
2023-03-02 19:10:33 +08:00
|
|
|
void block_cleanup_parameters(void);
|
2023-03-02 17:13:16 +08:00
|
|
|
|
2023-03-02 04:18:45 +08:00
|
|
|
#endif
|