diff options
author | Avihai Horon <avihaih@nvidia.com> | 2023-08-02 11:14:46 +0300 |
---|---|---|
committer | Cédric Le Goater <clg@redhat.com> | 2023-09-11 08:34:05 +0200 |
commit | 02b2e25360ea1f10a337ddaf686eb770eebf59de (patch) | |
tree | 76cbb8274dc91f1f46b286506ce42b57a8b8025f /include/sysemu | |
parent | 9d3103c81be307b3953f7e3f53ed0f742e9d786c (diff) |
qdev: Add qdev_add_vm_change_state_handler_full()
Add qdev_add_vm_change_state_handler_full() variant that allows setting
a prepare callback in addition to the main callback.
This will facilitate adding P2P support for VFIO migration in the
following patches.
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: YangHang Liu <yanghliu@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r-- | include/sysemu/runstate.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h index 764a0fc6a4..08afb97695 100644 --- a/include/sysemu/runstate.h +++ b/include/sysemu/runstate.h @@ -23,6 +23,9 @@ qemu_add_vm_change_state_handler_prio_full(VMChangeStateHandler *cb, VMChangeStateEntry *qdev_add_vm_change_state_handler(DeviceState *dev, VMChangeStateHandler *cb, void *opaque); +VMChangeStateEntry *qdev_add_vm_change_state_handler_full( + DeviceState *dev, VMChangeStateHandler *cb, + VMChangeStateHandler *prepare_cb, void *opaque); void qemu_del_vm_change_state_handler(VMChangeStateEntry *e); /** * vm_state_notify: Notify the state of the VM |