mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
Merge tag 'vfio-v6.2-rc1' of https://github.com/awilliam/linux-vfio
Pull VFIO updates from Alex Williamson: - Replace deprecated git://github.com link in MAINTAINERS (Palmer Dabbelt) - Simplify vfio/mlx5 with module_pci_driver() helper (Shang XiaoJing) - Drop unnecessary buffer from ACPI call (Rafael Mendonca) - Correct latent missing include issue in iova-bitmap and fix support for unaligned bitmaps. Follow-up with better fix through refactor (Joao Martins) - Rework ccw mdev driver to split private data from parent structure, better aligning with the mdev lifecycle and allowing us to remove a temporary workaround (Eric Farman) - Add an interface to get an estimated migration data size for a device, allowing userspace to make informed decisions, ex. more accurately predicting VM downtime (Yishai Hadas) - Fix minor typo in vfio/mlx5 array declaration (Yishai Hadas) - Simplify module and Kconfig through consolidating SPAPR/EEH code and config options and folding virqfd module into main vfio module (Jason Gunthorpe) - Fix error path from device_register() across all vfio mdev and sample drivers (Alex Williamson) - Define migration pre-copy interface and implement for vfio/mlx5 devices, allowing portions of the device state to be saved while the device continues operation, towards reducing the stop-copy state size (Jason Gunthorpe, Yishai Hadas, Shay Drory) - Implement pre-copy for hisi_acc devices (Shameer Kolothum) - Fixes to mdpy mdev driver remove path and error path on probe (Shang XiaoJing) - vfio/mlx5 fixes for incorrect return after copy_to_user() fault and incorrect buffer freeing (Dan Carpenter) * tag 'vfio-v6.2-rc1' of https://github.com/awilliam/linux-vfio: (42 commits) vfio/mlx5: error pointer dereference in error handling vfio/mlx5: fix error code in mlx5vf_precopy_ioctl() samples: vfio-mdev: Fix missing pci_disable_device() in mdpy_fb_probe() hisi_acc_vfio_pci: Enable PRE_COPY flag hisi_acc_vfio_pci: Move the dev compatibility tests for early check hisi_acc_vfio_pci: Introduce support for PRE_COPY state transitions hisi_acc_vfio_pci: Add support for precopy IOCTL vfio/mlx5: Enable MIGRATION_PRE_COPY flag vfio/mlx5: Fallback to STOP_COPY upon specific PRE_COPY error vfio/mlx5: Introduce multiple loads vfio/mlx5: Consider temporary end of stream as part of PRE_COPY vfio/mlx5: Introduce vfio precopy ioctl implementation vfio/mlx5: Introduce SW headers for migration states vfio/mlx5: Introduce device transitions of PRE_COPY vfio/mlx5: Refactor to use queue based data chunks vfio/mlx5: Refactor migration file state vfio/mlx5: Refactor MKEY usage vfio/mlx5: Refactor PD usage vfio/mlx5: Enforce a single SAVE command at a time vfio: Extend the device migration protocol with PRE_COPY ...
This commit is contained in:
@@ -146,6 +146,9 @@ int vfio_iommufd_emulated_attach_ioas(struct vfio_device *vdev, u32 *pt_id);
|
||||
* @migration_get_state: Optional callback to get the migration state for
|
||||
* devices that support migration. It's mandatory for
|
||||
* VFIO_DEVICE_FEATURE_MIGRATION migration support.
|
||||
* @migration_get_data_size: Optional callback to get the estimated data
|
||||
* length that will be required to complete stop copy. It's mandatory for
|
||||
* VFIO_DEVICE_FEATURE_MIGRATION migration support.
|
||||
*/
|
||||
struct vfio_migration_ops {
|
||||
struct file *(*migration_set_state)(
|
||||
@@ -153,6 +156,8 @@ struct vfio_migration_ops {
|
||||
enum vfio_device_mig_state new_state);
|
||||
int (*migration_get_state)(struct vfio_device *device,
|
||||
enum vfio_device_mig_state *curr_state);
|
||||
int (*migration_get_data_size)(struct vfio_device *device,
|
||||
unsigned long *stop_copy_length);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -215,9 +220,6 @@ struct vfio_device *_vfio_alloc_device(size_t size, struct device *dev,
|
||||
dev, ops), \
|
||||
struct dev_struct, member)
|
||||
|
||||
int vfio_init_device(struct vfio_device *device, struct device *dev,
|
||||
const struct vfio_device_ops *ops);
|
||||
void vfio_free_device(struct vfio_device *device);
|
||||
static inline void vfio_put_device(struct vfio_device *device)
|
||||
{
|
||||
put_device(&device->device);
|
||||
@@ -271,29 +273,6 @@ int vfio_set_irqs_validate_and_prepare(struct vfio_irq_set *hdr,
|
||||
int num_irqs, int max_irq_type,
|
||||
size_t *data_size);
|
||||
|
||||
struct pci_dev;
|
||||
#if IS_ENABLED(CONFIG_VFIO_SPAPR_EEH)
|
||||
void vfio_spapr_pci_eeh_open(struct pci_dev *pdev);
|
||||
void vfio_spapr_pci_eeh_release(struct pci_dev *pdev);
|
||||
long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group, unsigned int cmd,
|
||||
unsigned long arg);
|
||||
#else
|
||||
static inline void vfio_spapr_pci_eeh_open(struct pci_dev *pdev)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void vfio_spapr_pci_eeh_release(struct pci_dev *pdev)
|
||||
{
|
||||
}
|
||||
|
||||
static inline long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
|
||||
unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
return -ENOTTY;
|
||||
}
|
||||
#endif /* CONFIG_VFIO_SPAPR_EEH */
|
||||
|
||||
/*
|
||||
* IRQfd - generic
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user