|
7 | 7 | #include <uapi/linux/virtio_net.h>
|
8 | 8 | #include <uapi/linux/virtio_ids.h>
|
9 | 9 | #include <uapi/linux/vdpa.h>
|
| 10 | +#include <uapi/linux/vhost_types.h> |
10 | 11 | #include <linux/virtio_config.h>
|
11 | 12 | #include <linux/auxiliary_bus.h>
|
12 | 13 | #include <linux/mlx5/cq.h>
|
@@ -2559,6 +2560,11 @@ static void unregister_link_notifier(struct mlx5_vdpa_net *ndev)
|
2559 | 2560 | flush_workqueue(ndev->mvdev.wq);
|
2560 | 2561 | }
|
2561 | 2562 |
|
| 2563 | +static u64 mlx5_vdpa_get_backend_features(const struct vdpa_device *vdpa) |
| 2564 | +{ |
| 2565 | + return BIT_ULL(VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK); |
| 2566 | +} |
| 2567 | + |
2562 | 2568 | static int mlx5_vdpa_set_driver_features(struct vdpa_device *vdev, u64 features)
|
2563 | 2569 | {
|
2564 | 2570 | struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev);
|
@@ -3234,6 +3240,7 @@ static const struct vdpa_config_ops mlx5_vdpa_ops = {
|
3234 | 3240 | .get_vq_group = mlx5_vdpa_get_vq_group,
|
3235 | 3241 | .get_vq_desc_group = mlx5_vdpa_get_vq_desc_group, /* Op disabled if not supported. */
|
3236 | 3242 | .get_device_features = mlx5_vdpa_get_device_features,
|
| 3243 | + .get_backend_features = mlx5_vdpa_get_backend_features, |
3237 | 3244 | .set_driver_features = mlx5_vdpa_set_driver_features,
|
3238 | 3245 | .get_driver_features = mlx5_vdpa_get_driver_features,
|
3239 | 3246 | .set_config_cb = mlx5_vdpa_set_config_cb,
|
|
0 commit comments