mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
vfio/migration: Make x-migration-multifd-transfer VFIO property mutable
DEFINE_PROP_ON_OFF_AUTO() property isn't runtime-mutable so using it would mean that the source VM would need to decide upfront at startup time whether it wants to do a multifd device state transfer at some point. Source VM can run for a long time before being migrated so it is desirable to have a fallback mechanism to the old way of transferring VFIO device state if it turns to be necessary. This brings this property to the same mutability level as ordinary migration parameters, which too can be adjusted at the run time. Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/f2f2d66bda477da3e6cb8c0311006cff36e8651d.1741124640.git.maciej.szmigiero@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
parent
623af41dd3
commit
4c765ceaac
2 changed files with 21 additions and 3 deletions
|
@ -485,6 +485,10 @@ bool vfio_multifd_setup(VFIODevice *vbasedev, bool alloc_multifd, Error **errp)
|
|||
{
|
||||
VFIOMigration *migration = vbasedev->migration;
|
||||
|
||||
/*
|
||||
* Make a copy of this setting at the start in case it is changed
|
||||
* mid-migration.
|
||||
*/
|
||||
if (vbasedev->migration_multifd_transfer == ON_OFF_AUTO_AUTO) {
|
||||
migration->multifd_transfer = vfio_multifd_transfer_supported();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue