Home
last modified time | relevance | path

Searched refs:mvdev (Results 1 – 8 of 8) sorted by relevance

/linux/drivers/vdpa/mlx5/core/
H A Dresources.c51 static int create_uctx(struct mlx5_vdpa_dev *mvdev, u16 *uid) in create_uctx() argument
58 if (MLX5_CAP_GEN(mvdev->mdev, umem_uid_0)) in create_uctx()
62 if (!MLX5_CAP_GEN(mvdev->mdev, log_max_uctx)) in create_uctx()
73 err = mlx5_cmd_exec(mvdev->mdev, in, inlen, out, sizeof(out)); in create_uctx()
81 static void destroy_uctx(struct mlx5_vdpa_dev *mvdev, u32 uid) in destroy_uctx() argument
92 mlx5_cmd_exec(mvdev->mdev, in, sizeof(in), out, sizeof(out)); in destroy_uctx()
95 int mlx5_vdpa_create_tis(struct mlx5_vdpa_dev *mvdev, void *in, u32 *tisn) in mlx5_vdpa_create_tis() argument
101 MLX5_SET(create_tis_in, in, uid, mvdev->res.uid); in mlx5_vdpa_create_tis()
102 err = mlx5_cmd_exec_inout(mvdev->mdev, create_tis, in, out); in mlx5_vdpa_create_tis()
109 void mlx5_vdpa_destroy_tis(struct mlx5_vdpa_dev *mvdev, u32 tisn) in mlx5_vdpa_destroy_tis() argument
[all …]
H A Dmlx5_vdpa.h72 struct mlx5_vdpa_dev *mvdev; member
135 int mlx5_vdpa_create_tis(struct mlx5_vdpa_dev *mvdev, void *in, u32 *tisn);
136 void mlx5_vdpa_destroy_tis(struct mlx5_vdpa_dev *mvdev, u32 tisn);
137 int mlx5_vdpa_create_rqt(struct mlx5_vdpa_dev *mvdev, void *in, int inlen, u32 *rqtn);
138 int mlx5_vdpa_modify_rqt(struct mlx5_vdpa_dev *mvdev, void *in, int inlen, u32 rqtn);
139 void mlx5_vdpa_destroy_rqt(struct mlx5_vdpa_dev *mvdev, u32 rqtn);
140 int mlx5_vdpa_create_tir(struct mlx5_vdpa_dev *mvdev, void *in, u32 *tirn);
141 void mlx5_vdpa_destroy_tir(struct mlx5_vdpa_dev *mvdev, u32 tirn);
142 int mlx5_vdpa_alloc_transport_domain(struct mlx5_vdpa_dev *mvdev, u32 *tdn);
143 void mlx5_vdpa_dealloc_transport_domain(struct mlx5_vdpa_dev *mvdev, u32 tdn);
[all …]
/linux/drivers/vdpa/mlx5/net/
H A Dmlx5_vnet.c147 static bool is_index_valid(struct mlx5_vdpa_dev *mvdev, u16 idx) in is_index_valid() argument
149 if (!(mvdev->actual_features & BIT_ULL(VIRTIO_NET_F_MQ))) { in is_index_valid()
150 if (!(mvdev->actual_features & BIT_ULL(VIRTIO_NET_F_CTRL_VQ))) in is_index_valid()
156 return idx <= mvdev->max_idx; in is_index_valid()
170 mlx5_vdpa_info(mvdev, "%s\n", #_feature); \
176 mlx5_vdpa_info(mvdev, "%s\n", #_status); \
180 static inline bool mlx5_vdpa_is_little_endian(struct mlx5_vdpa_dev *mvdev) in mlx5_vdpa_is_little_endian() argument
183 (mvdev->actual_features & BIT_ULL(VIRTIO_F_VERSION_1)); in mlx5_vdpa_is_little_endian()
186 static u16 mlx5vdpa16_to_cpu(struct mlx5_vdpa_dev *mvdev, __virtio16 val) in mlx5vdpa16_to_cpu() argument
188 return __virtio16_to_cpu(mlx5_vdpa_is_little_endian(mvdev), val); in mlx5vdpa16_to_cpu()
[all …]
H A Ddebug.c102 node->ucast_counter.mdev = ndev->mvdev.mdev; in mlx5_vdpa_add_rx_counters()
103 node->mcast_counter.mdev = ndev->mvdev.mdev; in mlx5_vdpa_add_rx_counters()
142 mdev = ndev->mvdev.mdev; in mlx5_vdpa_add_debugfs()
143 ndev->debugfs = debugfs_create_dir(dev_name(&ndev->mvdev.vdev.dev), in mlx5_vdpa_add_debugfs()
H A Dmlx5_vnet.h10 container_of(__mvdev, struct mlx5_vdpa_net, mvdev)
44 struct mlx5_vdpa_dev mvdev; member
/linux/drivers/vfio/pci/mlx5/
H A Dmain.c303 queue_work(migf->mvdev->cb_wq, in mlx5vf_mig_file_set_save_work()
336 struct mlx5vf_pci_core_device *mvdev = migf->mvdev; in mlx5vf_mig_file_save_work() local
339 mutex_lock(&mvdev->state_mutex); in mlx5vf_mig_file_save_work()
349 if (mlx5vf_cmd_save_vhca_state(mvdev, migf, buf, true, false)) in mlx5vf_mig_file_save_work()
359 mlx5vf_state_mutex_unlock(mvdev); in mlx5vf_mig_file_save_work()
408 static int mlx5vf_prep_stop_copy(struct mlx5vf_pci_core_device *mvdev, in mlx5vf_prep_stop_copy() argument
419 if (mvdev->chunk_mode) { in mlx5vf_prep_stop_copy()
438 num_chunks = mvdev->chunk_mode ? MAX_NUM_CHUNKS : 1; in mlx5vf_prep_stop_copy()
454 if (mvdev->chunk_mode) { in mlx5vf_prep_stop_copy()
487 struct mlx5vf_pci_core_device *mvdev = migf->mvdev; in mlx5vf_precopy_ioctl() local
[all …]
H A Dcmd.c36 _mlx5vf_free_page_tracker_resources(struct mlx5vf_pci_core_device *mvdev);
38 int mlx5vf_cmd_suspend_vhca(struct mlx5vf_pci_core_device *mvdev, u16 op_mod) in mlx5vf_cmd_suspend_vhca() argument
40 struct mlx5_vf_migration_file *migf = mvdev->saving_migf; in mlx5vf_cmd_suspend_vhca()
45 lockdep_assert_held(&mvdev->state_mutex); in mlx5vf_cmd_suspend_vhca()
46 if (mvdev->mdev_detach) in mlx5vf_cmd_suspend_vhca()
62 MLX5_SET(suspend_vhca_in, in, vhca_id, mvdev->vhca_id); in mlx5vf_cmd_suspend_vhca()
65 err = mlx5_cmd_exec_inout(mvdev->mdev, suspend_vhca, in, out); in mlx5vf_cmd_suspend_vhca()
72 int mlx5vf_cmd_resume_vhca(struct mlx5vf_pci_core_device *mvdev, u16 op_mod) in mlx5vf_cmd_resume_vhca() argument
77 lockdep_assert_held(&mvdev->state_mutex); in mlx5vf_cmd_resume_vhca()
78 if (mvdev->mdev_detach) in mlx5vf_cmd_resume_vhca()
[all …]
H A Dcmd.h112 struct mlx5vf_pci_core_device *mvdev; member
199 int mlx5vf_cmd_suspend_vhca(struct mlx5vf_pci_core_device *mvdev, u16 op_mod);
200 int mlx5vf_cmd_resume_vhca(struct mlx5vf_pci_core_device *mvdev, u16 op_mod);
201 int mlx5vf_cmd_query_vhca_migration_state(struct mlx5vf_pci_core_device *mvdev,
204 void mlx5vf_cmd_set_migratable(struct mlx5vf_pci_core_device *mvdev,
207 void mlx5vf_cmd_remove_migratable(struct mlx5vf_pci_core_device *mvdev);
208 void mlx5vf_cmd_close_migratable(struct mlx5vf_pci_core_device *mvdev);
209 int mlx5vf_cmd_save_vhca_state(struct mlx5vf_pci_core_device *mvdev,
213 int mlx5vf_cmd_load_vhca_state(struct mlx5vf_pci_core_device *mvdev,
229 void mlx5vf_state_mutex_unlock(struct mlx5vf_pci_core_device *mvdev);
[all …]