The following changes since commit b0b74e1f17508cb8cef8afd698558db1bd8999cc:
Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging (2020-01-06 11:39:55 +0000) are available in the Git repository at: https://github.com/elmarco/qemu.git tags/dbus-vmstate7-pull-request for you to fetch changes up to 586ca6ba3cd6d7a3a85ed5cdc4e53b1cd584b0c0: tests: add dbus-vmstate-test (2020-01-06 18:41:32 +0400) ---------------------------------------------------------------- Add dbus-vmstate Hi, With external processes or helpers participating to the VM support, it becomes necessary to handle their migration. Various options exist to transfer their state: 1) as the VM memory, RAM or devices (we could say that's how vhost-user devices can be handled today, they are expected to restore from ring state) 2) other "vmstate" (as with TPM emulator state blobs) 3) left to be handled by management layer 1) is not practical, since an external processes may legitimatelly need arbitrary state date to back a device or a service, or may not even have an associated device. 2) needs ad-hoc code for each helper, but is simple and working 3) is complicated for management layer, QEMU has the migration timing The proposed "dbus-vmstate" object will connect to a given D-Bus address, and save/load from org.qemu.VMState1 owners on migration. Thus helpers can easily have their state migrated with QEMU, without implementing ad-hoc support (such as done for TPM emulation) D-Bus is ubiquitous on Linux (it is systemd IPC), and can be made to work on various other OSes. There are several implementations and good bindings for various languages. (the tests/dbus-vmstate-test.c is a good example of how simple the implementation of services can be, even in C) dbus-vmstate is put into use by the libvirt series "[PATCH 00/23] Use a slirp helper process". ---------------------------------------------------------------- Marc-André Lureau (9): vmstate: add qom interface to get id vmstate: replace DeviceState with VMStateIf docs: start a document to describe D-Bus usage util: add dbus helper unit Add dbus-vmstate object configure: add GDBUS_CODEGEN dockerfiles: add dbus-daemon to some of latest distributions tests: add migration-helpers unit tests: add dbus-vmstate-test configure | 7 + include/hw/vmstate-if.h | 40 ++ include/migration/register.h | 4 +- include/migration/vmstate.h | 10 +- include/qemu/dbus.h | 19 + tests/migration-helpers.h | 37 ++ backends/dbus-vmstate.c | 510 +++++++++++++++++++++++ hw/block/onenand.c | 2 +- hw/core/qdev.c | 21 +- hw/core/vmstate-if.c | 23 + hw/ide/cmd646.c | 2 +- hw/ide/isa.c | 2 +- hw/ide/piix.c | 2 +- hw/ide/via.c | 2 +- hw/misc/max111x.c | 2 +- hw/net/eepro100.c | 4 +- hw/net/virtio-net.c | 3 +- hw/nvram/eeprom93xx.c | 4 +- hw/ppc/spapr_drc.c | 9 +- hw/ppc/spapr_iommu.c | 4 +- hw/s390x/s390-skeys.c | 2 +- migration/savevm.c | 20 +- stubs/vmstate.c | 4 +- tests/dbus-vmstate-test.c | 382 +++++++++++++++++ tests/migration-helpers.c | 167 ++++++++ tests/migration-test.c | 176 +------- util/dbus.c | 57 +++ MAINTAINERS | 12 + Makefile.objs | 1 + backends/Makefile.objs | 4 + backends/trace-events | 7 + docs/interop/dbus-vmstate.rst | 74 ++++ docs/interop/dbus.rst | 110 +++++ docs/interop/index.rst | 2 + hw/core/Makefile.objs | 1 + tests/Makefile.include | 25 +- tests/dbus-vmstate-daemon.sh | 95 +++++ tests/dbus-vmstate1.xml | 12 + tests/docker/dockerfiles/centos7.docker | 1 + tests/docker/dockerfiles/debian10.docker | 1 + tests/docker/dockerfiles/fedora.docker | 1 + tests/docker/dockerfiles/ubuntu.docker | 1 + util/Makefile.objs | 3 + 43 files changed, 1660 insertions(+), 205 deletions(-) create mode 100644 include/hw/vmstate-if.h create mode 100644 include/qemu/dbus.h create mode 100644 tests/migration-helpers.h create mode 100644 backends/dbus-vmstate.c create mode 100644 hw/core/vmstate-if.c create mode 100644 tests/dbus-vmstate-test.c create mode 100644 tests/migration-helpers.c create mode 100644 util/dbus.c create mode 100644 backends/trace-events create mode 100644 docs/interop/dbus-vmstate.rst create mode 100644 docs/interop/dbus.rst create mode 100755 tests/dbus-vmstate-daemon.sh create mode 100644 tests/dbus-vmstate1.xml -- 2.25.0.rc1.1.gb0343b22ed
