Home
last modified time | relevance | path

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

/openbmc/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 Dmr.c52 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 …]
H A Dmlx5_vdpa.h71 struct mlx5_vdpa_dev *mvdev; member
103 int mlx5_vdpa_create_tis(struct mlx5_vdpa_dev *mvdev, void *in, u32 *tisn);
104 void mlx5_vdpa_destroy_tis(struct mlx5_vdpa_dev *mvdev, u32 tisn);
105 int mlx5_vdpa_create_rqt(struct mlx5_vdpa_dev *mvdev, void *in, int inlen, u32 *rqtn);
106 int mlx5_vdpa_modify_rqt(struct mlx5_vdpa_dev *mvdev, void *in, int inlen, u32 rqtn);
107 void mlx5_vdpa_destroy_rqt(struct mlx5_vdpa_dev *mvdev, u32 rqtn);
108 int mlx5_vdpa_create_tir(struct mlx5_vdpa_dev *mvdev, void *in, u32 *tirn);
109 void mlx5_vdpa_destroy_tir(struct mlx5_vdpa_dev *mvdev, u32 tirn);
110 int mlx5_vdpa_alloc_transport_domain(struct mlx5_vdpa_dev *mvdev, u32 *tdn);
111 void mlx5_vdpa_dealloc_transport_domain(struct mlx5_vdpa_dev *mvdev, u32 tdn);
[all …]
/openbmc/linux/drivers/vdpa/mlx5/net/
H A Dmlx5_vnet.c128 static bool is_index_valid(struct mlx5_vdpa_dev *mvdev, u16 idx) in is_index_valid() argument
130 if (!(mvdev->actual_features & BIT_ULL(VIRTIO_NET_F_MQ))) { in is_index_valid()
131 if (!(mvdev->actual_features & BIT_ULL(VIRTIO_NET_F_CTRL_VQ))) in is_index_valid()
137 return idx <= mvdev->max_idx; in is_index_valid()
142 static int setup_driver(struct mlx5_vdpa_dev *mvdev);
150 mlx5_vdpa_info(mvdev, "%s\n", #_feature); \
156 mlx5_vdpa_info(mvdev, "%s\n", #_status); \
160 static inline bool mlx5_vdpa_is_little_endian(struct mlx5_vdpa_dev *mvdev) in mlx5_vdpa_is_little_endian() argument
163 (mvdev->actual_features & BIT_ULL(VIRTIO_F_VERSION_1)); in mlx5_vdpa_is_little_endian()
166 static u16 mlx5vdpa16_to_cpu(struct mlx5_vdpa_dev *mvdev, __virtio16 val) in mlx5vdpa16_to_cpu() argument
[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
/openbmc/linux/drivers/vfio/pci/mlx5/
H A Dmain.c392 struct mlx5vf_pci_core_device *mvdev = migf->mvdev; in mlx5vf_precopy_ioctl() local
412 mutex_lock(&mvdev->state_mutex); in mlx5vf_precopy_ioctl()
413 if (mvdev->mig_state != VFIO_DEVICE_STATE_PRE_COPY && in mlx5vf_precopy_ioctl()
414 mvdev->mig_state != VFIO_DEVICE_STATE_PRE_COPY_P2P) { in mlx5vf_precopy_ioctl()
424 if (mvdev->mig_state == VFIO_DEVICE_STATE_PRE_COPY) { in mlx5vf_precopy_ioctl()
430 ret = mlx5vf_cmd_query_vhca_migration_state(mvdev, &inc_length, in mlx5vf_precopy_ioctl()
468 ret = mlx5vf_cmd_save_vhca_state(mvdev, migf, buf, true, true); in mlx5vf_precopy_ioctl()
476 mlx5vf_state_mutex_unlock(mvdev); in mlx5vf_precopy_ioctl()
484 mlx5vf_state_mutex_unlock(mvdev); in mlx5vf_precopy_ioctl()
498 static int mlx5vf_pci_save_device_inc_data(struct mlx5vf_pci_core_device *mvdev) in mlx5vf_pci_save_device_inc_data() argument
[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.h16 #define MLX5VF_PRE_COPY_SUPP(mvdev) \ argument
17 ((mvdev)->core_device.vdev.migration_flags & VFIO_MIGRATION_PRE_COPY)
102 struct mlx5vf_pci_core_device *mvdev; member
186 int mlx5vf_cmd_suspend_vhca(struct mlx5vf_pci_core_device *mvdev, u16 op_mod);
187 int mlx5vf_cmd_resume_vhca(struct mlx5vf_pci_core_device *mvdev, u16 op_mod);
188 int mlx5vf_cmd_query_vhca_migration_state(struct mlx5vf_pci_core_device *mvdev,
190 void mlx5vf_cmd_set_migratable(struct mlx5vf_pci_core_device *mvdev,
193 void mlx5vf_cmd_remove_migratable(struct mlx5vf_pci_core_device *mvdev);
194 void mlx5vf_cmd_close_migratable(struct mlx5vf_pci_core_device *mvdev);
195 int mlx5vf_cmd_save_vhca_state(struct mlx5vf_pci_core_device *mvdev,
[all …]