Re: [PATCH v5 10/20] vfio/pci: Retrieve preserved device files after Live Update
From: Josh Hilke
Date: Tue Jul 21 2026 - 12:37:34 EST
On Tue, Jul 14, 2026 at 8:15 AM Vipin Sharma <vipinsh@xxxxxxxxxx> wrote:
> static int vfio_pci_liveupdate_retrieve(struct liveupdate_file_op_args *args)
> {
> - return -EOPNOTSUPP;
> + struct vfio_pci_core_device_ser *ser;
> + struct vfio_device *device;
> + struct file *file;
> + int ret = 0;
> +
> + ser = phys_to_virt(args->serialized_data);
> +
> + device = vfio_find_device(ser, match_device);
> + if (!device)
> + return -ENODEV;
> +
> + file = vfio_device_liveupdate_cdev_open(device);
> + if (IS_ERR(file)) {
> + ret = PTR_ERR(file);
> + goto out;
> + }
> +
> + args->file = file;
> +out:
> + /* Drop the reference from vfio_find_device() */
> + vfio_device_put_registration(device);
> + return ret;
> +
Remove extra newline after "return ret"