diff options
| author | Yishai Hadas <yishaih@nvidia.com> | 2026-03-17 19:17:49 +0300 |
|---|---|---|
| committer | Alex Williamson <alex@shazbot.org> | 2026-03-19 21:32:08 +0300 |
| commit | 50ff3f404617c5d15832fec3711978104c4c9efd (patch) | |
| tree | 3adf13e6508f71acc707308ae753bfbb785ae08b /include | |
| parent | d7140b5dde459048da52cfc0494228055f7e2fb8 (diff) | |
| download | linux-50ff3f404617c5d15832fec3711978104c4c9efd.tar.xz | |
vfio: Add support for VFIO_DEVICE_FEATURE_MIG_PRECOPY_INFOv2
Currently, existing VFIO_MIG_GET_PRECOPY_INFO implementations don't
assign info.flags before copy_to_user().
Because they copy the struct in from userspace first, this effectively
echoes userspace-provided flags back as output, preventing the field
from being used to report new reliable data from the drivers.
Add support for a new device feature named
VFIO_DEVICE_FEATURE_MIG_PRECOPY_INFOv2.
On SET, enables the v2 pre_copy_info behaviour, where the
vfio_precopy_info.flags is a valid output field.
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://lore.kernel.org/r/20260317161753.18964-3-yishaih@nvidia.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/vfio.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/vfio.h b/include/linux/vfio.h index e90859956514..7c1d33283e04 100644 --- a/include/linux/vfio.h +++ b/include/linux/vfio.h @@ -52,6 +52,7 @@ struct vfio_device { struct vfio_device_set *dev_set; struct list_head dev_set_list; unsigned int migration_flags; + u8 precopy_info_v2; struct kvm *kvm; /* Members below here are private, not for driver use */ |
