diff options
| author | Maciej S. Szmigiero <maciej.szmigiero@oracle.com> | 2025-07-15 16:37:37 +0200 |
|---|---|---|
| committer | Cédric Le Goater <clg@redhat.com> | 2025-07-15 17:11:12 +0200 |
| commit | 300dcf58b72fa1635190b19f102231b0775e93cb (patch) | |
| tree | ef712b0fe23af924c43bbab81ec40948d9027aa2 /include/hw | |
| parent | 6380b0a02fbdac253b8a98b300398319ab655237 (diff) | |
| download | focaccia-qemu-300dcf58b72fa1635190b19f102231b0775e93cb.tar.gz focaccia-qemu-300dcf58b72fa1635190b19f102231b0775e93cb.zip | |
vfio/migration: Max in-flight VFIO device state buffers size limit
Allow capping the maximum total size of in-flight VFIO device state buffers queued at the destination, otherwise a malicious QEMU source could theoretically cause the target QEMU to allocate unlimited amounts of memory for buffers-in-flight. Since this is not expected to be a realistic threat in most of VFIO live migration use cases and the right value depends on the particular setup disable this limit by default by setting it to UINT64_MAX. Reviewed-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Avihai Horon <avihaih@nvidia.com> Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com> Link: https://lore.kernel.org/qemu-devel/4f7cad490988288f58e36b162d7a888ed7e7fd17.1752589295.git.maciej.szmigiero@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'include/hw')
| -rw-r--r-- | include/hw/vfio/vfio-device.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/vfio/vfio-device.h b/include/hw/vfio/vfio-device.h index dac3fdce15..6e4d5ccdac 100644 --- a/include/hw/vfio/vfio-device.h +++ b/include/hw/vfio/vfio-device.h @@ -68,6 +68,7 @@ typedef struct VFIODevice { OnOffAuto enable_migration; OnOffAuto migration_multifd_transfer; OnOffAuto migration_load_config_after_iter; + uint64_t migration_max_queued_buffers_size; bool migration_events; bool use_region_fds; VFIODeviceOps *ops; |