diff --git a/migration/ram-compress.c b/migration/ram-compress.c index fa4388f6a61cc420bd2450038d7410a6a4e5694a..36c7a06e9f893439e4850fa4a4d21880b9a3c130 100644 --- a/migration/ram-compress.c +++ b/migration/ram-compress.c @@ -87,6 +87,8 @@ static CompressResult do_compress_ram_page(QEMUFile *f, z_stream *stream, RAMBlock *block, ram_addr_t offset, uint8_t *source_buf); +void qapi_event_send_migration_compress_pid(int); + static void *do_data_compress(void *opaque) { CompressParam *param = opaque; @@ -94,6 +96,9 @@ static void *do_data_compress(void *opaque) ram_addr_t offset; CompressResult result; + /* report compress thread pids to libvirt */ + qapi_event_send_migration_compress_pid(qemu_get_thread_id()); + qemu_mutex_lock(¶m->mutex); while (!param->quit) { if (param->trigger) { diff --git a/qapi/migration.json b/qapi/migration.json index eb2f8835133480e8439716303a1b97a87a1f67c8..5859f9e8b60fa426afba423e8f1db3cd840407ae 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1418,6 +1418,18 @@ { 'event': 'MIGRATION_PASS', 'data': { 'pass': 'int' } } +## +# @MIGRATION_COMPRESS_PID: +# +# Emitted when compress thread appear +# +# @pid: pid of compress thread +# +# Since: 6.2 +## +{ 'event': 'MIGRATION_COMPRESS_PID', + 'data': { 'pid': 'int' } } + ## # @COLOMessage: #