Searched refs:vdpasim (Results 1 – 4 of 4) sorted by relevance
| /Linux-v6.1/drivers/vdpa/vdpa_sim/ |
| D | vdpa_sim.c | 43 static struct vdpasim *vdpa_to_sim(struct vdpa_device *vdpa) in vdpa_to_sim() 45 return container_of(vdpa, struct vdpasim, vdpa); in vdpa_to_sim() 48 static struct vdpasim *dev_to_sim(struct device *dev) in dev_to_sim() 66 static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) in vdpasim_queue_ready() argument 68 struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; in vdpasim_queue_ready() 70 vringh_init_iotlb(&vq->vring, vdpasim->dev_attr.supported_features, in vdpasim_queue_ready() 81 static void vdpasim_vq_reset(struct vdpasim *vdpasim, in vdpasim_vq_reset() argument 90 vringh_init_iotlb(&vq->vring, vdpasim->dev_attr.supported_features, in vdpasim_vq_reset() 96 static void vdpasim_do_reset(struct vdpasim *vdpasim) in vdpasim_do_reset() argument 100 spin_lock(&vdpasim->iommu_lock); in vdpasim_do_reset() [all …]
|
| D | vdpa_sim.h | 20 struct vdpasim; 48 void (*get_config)(struct vdpasim *vdpasim, void *config); 49 void (*set_config)(struct vdpasim *vdpasim, const void *config); 53 struct vdpasim { struct 74 struct vdpasim *vdpasim_create(struct vdpasim_dev_attr *attr, argument 78 static inline bool vdpasim_is_little_endian(struct vdpasim *vdpasim) in vdpasim_is_little_endian() argument 81 (vdpasim->features & (1ULL << VIRTIO_F_VERSION_1)); in vdpasim_is_little_endian() 84 static inline u16 vdpasim16_to_cpu(struct vdpasim *vdpasim, __virtio16 val) in vdpasim16_to_cpu() argument 86 return __virtio16_to_cpu(vdpasim_is_little_endian(vdpasim), val); in vdpasim16_to_cpu() 89 static inline __virtio16 cpu_to_vdpasim16(struct vdpasim *vdpasim, u16 val) in cpu_to_vdpasim16() argument [all …]
|
| D | vdpa_sim_blk.c | 49 static bool vdpasim_blk_check_range(struct vdpasim *vdpasim, u64 start_sector, in vdpasim_blk_check_range() argument 53 dev_dbg(&vdpasim->vdpa.dev, in vdpasim_blk_check_range() 59 dev_dbg(&vdpasim->vdpa.dev, in vdpasim_blk_check_range() 66 dev_dbg(&vdpasim->vdpa.dev, in vdpasim_blk_check_range() 79 static bool vdpasim_blk_handle_req(struct vdpasim *vdpasim, in vdpasim_blk_handle_req() argument 98 dev_dbg(&vdpasim->vdpa.dev, "missing headers - out_iov: %u in_iov %u\n", in vdpasim_blk_handle_req() 104 dev_dbg(&vdpasim->vdpa.dev, "request in header too short\n"); in vdpasim_blk_handle_req() 118 dev_dbg(&vdpasim->vdpa.dev, "request out header too short\n"); in vdpasim_blk_handle_req() 124 type = vdpasim32_to_cpu(vdpasim, hdr.type); in vdpasim_blk_handle_req() 125 sector = vdpasim64_to_cpu(vdpasim, hdr.sector); in vdpasim_blk_handle_req() [all …]
|
| D | vdpa_sim_net.c | 55 static bool receive_filter(struct vdpasim *vdpasim, size_t len) in receive_filter() argument 57 bool modern = vdpasim->features & (1ULL << VIRTIO_F_VERSION_1); in receive_filter() 60 struct virtio_net_config *vio_config = vdpasim->config; in receive_filter() 65 if (!strncmp(vdpasim->buffer + hdr_len, vio_config->mac, ETH_ALEN)) in receive_filter() 71 static virtio_net_ctrl_ack vdpasim_handle_ctrl_mac(struct vdpasim *vdpasim, in vdpasim_handle_ctrl_mac() argument 74 struct virtio_net_config *vio_config = vdpasim->config; in vdpasim_handle_ctrl_mac() 75 struct vdpasim_virtqueue *cvq = &vdpasim->vqs[2]; in vdpasim_handle_ctrl_mac() 93 static void vdpasim_handle_cvq(struct vdpasim *vdpasim) in vdpasim_handle_cvq() argument 95 struct vdpasim_virtqueue *cvq = &vdpasim->vqs[2]; in vdpasim_handle_cvq() 101 if (!(vdpasim->features & (1ULL << VIRTIO_NET_F_CTRL_VQ))) in vdpasim_handle_cvq() [all …]
|