diff options
-rw-r--r-- | docs/qmp-events.txt | 14 | ||||
-rw-r--r-- | migration/ram.c | 4 | ||||
-rw-r--r-- | qapi/event.json | 13 |
3 files changed, 31 insertions, 0 deletions
diff --git a/docs/qmp-events.txt b/docs/qmp-events.txt index d2f1ce497e..52eb7e2f5e 100644 --- a/docs/qmp-events.txt +++ b/docs/qmp-events.txt @@ -496,6 +496,20 @@ Example: {"timestamp": {"seconds": 1432121972, "microseconds": 744001}, "event": "MIGRATION", "data": {"status": "completed"}} +MIGRATION_PASS +-------------- + +Emitted from the source side of a migration at the start of each pass +(when it syncs the dirty bitmap) + +Data: None. + + - "pass": An incrementing count (starting at 1 on the first pass) + +Example: +{"timestamp": {"seconds": 1449669631, "microseconds": 239225}, + "event": "MIGRATION_PASS", "data": {"pass": 2}} + STOP ---- diff --git a/migration/ram.c b/migration/ram.c index 0490f005dd..102d1f2b14 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -27,6 +27,7 @@ */ #include <stdint.h> #include <zlib.h> +#include "qapi-event.h" #include "qemu/bitops.h" #include "qemu/bitmap.h" #include "qemu/timer.h" @@ -682,6 +683,9 @@ static void migration_bitmap_sync(void) num_dirty_pages_period = 0; } s->dirty_sync_count = bitmap_sync_count; + if (migrate_use_events()) { + qapi_event_send_migration_pass(bitmap_sync_count, NULL); + } } /** diff --git a/qapi/event.json b/qapi/event.json index f0cef010f0..390fd45788 100644 --- a/qapi/event.json +++ b/qapi/event.json @@ -255,6 +255,19 @@ 'data': {'status': 'MigrationStatus'}} ## +# @MIGRATION_PASS +# +# Emitted from the source side of a migration at the start of each pass +# (when it syncs the dirty bitmap) +# +# @pass: An incrementing count (starting at 1 on the first pass) +# +# Since: 2.6 +## +{ 'event': 'MIGRATION_PASS', + 'data': { 'pass': 'int' } } + +## # @ACPI_DEVICE_OST # # Emitted when guest executes ACPI _OST method. |