migration: add postcopy total blocktime into query-migrate
commitca6011c2329121ecc25081f884a5d9016acc6572
authorAlexey Perevalov <a.perevalov@samsung.com>
Mon, 30 Oct 2017 13:16:30 +0000 (30 16:16 +0300)
committerJuan Quintela <quintela@redhat.com>
Mon, 15 Jan 2018 11:48:04 +0000 (15 12:48 +0100)
treedabf3541db17fd8706aa25c6ec9dbea0fef5b7ab
parent5f32dc8ee073d250abd9e8915f6884ba20d5de62
migration: add postcopy total blocktime into query-migrate

Postcopy total blocktime is available on destination side only.
But query-migrate was possible only for source. This patch
adds ability to call query-migrate on destination.
To be able to see postcopy blocktime, need to request postcopy-blocktime
capability.

The query-migrate command will show following sample result:
{"return":
    "postcopy-vcpu-blocktime": [115, 100],
    "status": "completed",
    "postcopy-blocktime": 100
}}

postcopy_vcpu_blocktime contains list, where the first item is the first
vCPU in QEMU.

This patch has a drawback, it combines states of incoming and
outgoing migration. Ongoing migration state will overwrite incoming
state. Looks like better to separate query-migrate for incoming and
outgoing migration or add parameter to indicate type of migration.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
hmp.c
migration/migration.c
migration/migration.h
migration/postcopy-ram.c
migration/trace-events
qapi/migration.json