| /Linux-v6.1/drivers/vdpa/mlx5/core/ |
| D | resources.c | 51 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 …]
|
| D | mr.c | 52 static int create_direct_mr(struct mlx5_vdpa_dev *mvdev, struct mlx5_vdpa_direct_mr *mr) in create_direct_mr() argument 64 MLX5_SET(create_mkey_in, in, uid, mvdev->res.uid); in create_direct_mr() 70 MLX5_SET(mkc, mkc, pd, mvdev->res.pdn); in create_direct_mr() 79 err = mlx5_vdpa_create_mkey(mvdev, &mr->mr, in, inlen); in create_direct_mr() 82 mlx5_vdpa_warn(mvdev, "Failed to create direct MR\n"); in create_direct_mr() 89 static void destroy_direct_mr(struct mlx5_vdpa_dev *mvdev, struct mlx5_vdpa_direct_mr *mr) in destroy_direct_mr() argument 91 mlx5_vdpa_destroy_mkey(mvdev, mr->mr); in destroy_direct_mr() 145 static void fill_indir(struct mlx5_vdpa_dev *mvdev, struct mlx5_vdpa_mr *mkey, void *in) in fill_indir() argument 169 klm->key = cpu_to_be32(mvdev->res.null_mkey); in fill_indir() 182 static int create_indirect_key(struct mlx5_vdpa_dev *mvdev, struct mlx5_vdpa_mr *mr) in create_indirect_key() argument [all …]
|
| D | mlx5_vdpa.h | 70 struct mlx5_vdpa_dev *mvdev; member 104 int mlx5_vdpa_create_tis(struct mlx5_vdpa_dev *mvdev, void *in, u32 *tisn); 105 void mlx5_vdpa_destroy_tis(struct mlx5_vdpa_dev *mvdev, u32 tisn); 106 int mlx5_vdpa_create_rqt(struct mlx5_vdpa_dev *mvdev, void *in, int inlen, u32 *rqtn); 107 int mlx5_vdpa_modify_rqt(struct mlx5_vdpa_dev *mvdev, void *in, int inlen, u32 rqtn); 108 void mlx5_vdpa_destroy_rqt(struct mlx5_vdpa_dev *mvdev, u32 rqtn); 109 int mlx5_vdpa_create_tir(struct mlx5_vdpa_dev *mvdev, void *in, u32 *tirn); 110 void mlx5_vdpa_destroy_tir(struct mlx5_vdpa_dev *mvdev, u32 tirn); 111 int mlx5_vdpa_alloc_transport_domain(struct mlx5_vdpa_dev *mvdev, u32 *tdn); 112 void mlx5_vdpa_dealloc_transport_domain(struct mlx5_vdpa_dev *mvdev, u32 tdn); [all …]
|
| /Linux-v6.1/drivers/vfio/pci/mlx5/ |
| D | main.c | 227 mlx5vf_pci_save_device_data(struct mlx5vf_pci_core_device *mvdev) in mlx5vf_pci_save_device_data() argument 248 mlx5_cmd_init_async_ctx(mvdev->mdev, &migf->async_ctx); in mlx5vf_pci_save_device_data() 250 ret = mlx5vf_cmd_query_vhca_migration_state(mvdev, in mlx5vf_pci_save_device_data() 260 migf->mvdev = mvdev; in mlx5vf_pci_save_device_data() 261 ret = mlx5vf_cmd_save_vhca_state(mvdev, migf); in mlx5vf_pci_save_device_data() 345 mlx5vf_pci_resume_device_data(struct mlx5vf_pci_core_device *mvdev) in mlx5vf_pci_resume_device_data() argument 366 void mlx5vf_disable_fds(struct mlx5vf_pci_core_device *mvdev) in mlx5vf_disable_fds() argument 368 if (mvdev->resuming_migf) { in mlx5vf_disable_fds() 369 mlx5vf_disable_fd(mvdev->resuming_migf); in mlx5vf_disable_fds() 370 fput(mvdev->resuming_migf->filp); in mlx5vf_disable_fds() [all …]
|
| D | cmd.c | 13 _mlx5vf_free_page_tracker_resources(struct mlx5vf_pci_core_device *mvdev); 15 int mlx5vf_cmd_suspend_vhca(struct mlx5vf_pci_core_device *mvdev, u16 op_mod) in mlx5vf_cmd_suspend_vhca() argument 20 lockdep_assert_held(&mvdev->state_mutex); in mlx5vf_cmd_suspend_vhca() 21 if (mvdev->mdev_detach) in mlx5vf_cmd_suspend_vhca() 25 MLX5_SET(suspend_vhca_in, in, vhca_id, mvdev->vhca_id); in mlx5vf_cmd_suspend_vhca() 28 return mlx5_cmd_exec_inout(mvdev->mdev, suspend_vhca, in, out); in mlx5vf_cmd_suspend_vhca() 31 int mlx5vf_cmd_resume_vhca(struct mlx5vf_pci_core_device *mvdev, u16 op_mod) in mlx5vf_cmd_resume_vhca() argument 36 lockdep_assert_held(&mvdev->state_mutex); in mlx5vf_cmd_resume_vhca() 37 if (mvdev->mdev_detach) in mlx5vf_cmd_resume_vhca() 41 MLX5_SET(resume_vhca_in, in, vhca_id, mvdev->vhca_id); in mlx5vf_cmd_resume_vhca() [all …]
|
| D | cmd.h | 38 struct mlx5vf_pci_core_device *mvdev; member 116 int mlx5vf_cmd_suspend_vhca(struct mlx5vf_pci_core_device *mvdev, u16 op_mod); 117 int mlx5vf_cmd_resume_vhca(struct mlx5vf_pci_core_device *mvdev, u16 op_mod); 118 int mlx5vf_cmd_query_vhca_migration_state(struct mlx5vf_pci_core_device *mvdev, 120 void mlx5vf_cmd_set_migratable(struct mlx5vf_pci_core_device *mvdev, 123 void mlx5vf_cmd_remove_migratable(struct mlx5vf_pci_core_device *mvdev); 124 void mlx5vf_cmd_close_migratable(struct mlx5vf_pci_core_device *mvdev); 125 int mlx5vf_cmd_save_vhca_state(struct mlx5vf_pci_core_device *mvdev, 127 int mlx5vf_cmd_load_vhca_state(struct mlx5vf_pci_core_device *mvdev, 129 void mlx5vf_state_mutex_unlock(struct mlx5vf_pci_core_device *mvdev); [all …]
|
| /Linux-v6.1/drivers/vdpa/mlx5/net/ |
| D | mlx5_vnet.c | 27 container_of(__mvdev, struct mlx5_vdpa_net, mvdev) 137 static bool is_index_valid(struct mlx5_vdpa_dev *mvdev, u16 idx) in is_index_valid() argument 139 if (!(mvdev->actual_features & BIT_ULL(VIRTIO_NET_F_MQ))) { in is_index_valid() 140 if (!(mvdev->actual_features & BIT_ULL(VIRTIO_NET_F_CTRL_VQ))) in is_index_valid() 146 return idx <= mvdev->max_idx; in is_index_valid() 152 struct mlx5_vdpa_dev mvdev; member 183 static int setup_driver(struct mlx5_vdpa_dev *mvdev); 193 mlx5_vdpa_info(mvdev, "%s\n", #_feature); \ 199 mlx5_vdpa_info(mvdev, "%s\n", #_status); \ 203 static inline bool mlx5_vdpa_is_little_endian(struct mlx5_vdpa_dev *mvdev) in mlx5_vdpa_is_little_endian() argument [all …]
|