Re: [PATCH v2 08/22] vfio: Enforce preserved devices are retrieved via LIVEUPDATE_SESSION_RETRIEVE_FD

Pranjal Shrivastava
2026-02-25T08:03:30Z

On Thu, Jan 29, 2026 at 09:24:55PM +0000, David Matlack wrote:
> Enforce that files for incoming (preserved by previous kernel) VFIO
> devices are retrieved via LIVEUPDATE_SESSION_RETRIEVE_FD rather than by
> opening the corresponding VFIO character device or via
> VFIO_GROUP_GET_DEVICE_FD.
>
> Both of these methods would result in VFIO initializing the device
> without access to the preserved state of the device passed by the
> previous kernel.
>
> Signed-off-by: David Matlack <dmatlack@google.com>
> ---
> drivers/vfio/device_cdev.c | 4 ++++
> drivers/vfio/group.c | 9 +++++++++
> include/linux/vfio.h | 18 ++++++++++++++++++
> 3 files changed, 31 insertions(+)
>

Reviewed-by: Pranjal Shrivastava <praan@google.com>

Thanks,
Praan