Searched refs:vdpasim (Results 1 – 4 of 4) sorted by relevance
| /Linux-v5.15/drivers/vdpa/vdpa_sim/ |
| D | vdpa_sim.c | 42 static struct vdpasim *vdpa_to_sim(struct vdpa_device *vdpa) in vdpa_to_sim() 44 return container_of(vdpa, struct vdpasim, vdpa); in vdpa_to_sim() 47 static struct vdpasim *dev_to_sim(struct device *dev) in dev_to_sim() 65 static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) in vdpasim_queue_ready() argument 67 struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; in vdpasim_queue_ready() 69 vringh_init_iotlb(&vq->vring, vdpasim->dev_attr.supported_features, in vdpasim_queue_ready() 80 static void vdpasim_vq_reset(struct vdpasim *vdpasim, in vdpasim_vq_reset() argument 89 vringh_init_iotlb(&vq->vring, vdpasim->dev_attr.supported_features, in vdpasim_vq_reset() 95 static void vdpasim_do_reset(struct vdpasim *vdpasim) in vdpasim_do_reset() argument 99 for (i = 0; i < vdpasim->dev_attr.nvqs; i++) in vdpasim_do_reset() [all …]
|
| D | vdpa_sim.h | 20 struct vdpasim; 46 void (*get_config)(struct vdpasim *vdpasim, void *config); 47 void (*set_config)(struct vdpasim *vdpasim, const void *config); 51 struct vdpasim { struct 70 struct vdpasim *vdpasim_create(struct vdpasim_dev_attr *attr); argument 73 static inline bool vdpasim_is_little_endian(struct vdpasim *vdpasim) in vdpasim_is_little_endian() argument 76 (vdpasim->features & (1ULL << VIRTIO_F_VERSION_1)); in vdpasim_is_little_endian() 79 static inline u16 vdpasim16_to_cpu(struct vdpasim *vdpasim, __virtio16 val) in vdpasim16_to_cpu() argument 81 return __virtio16_to_cpu(vdpasim_is_little_endian(vdpasim), val); in vdpasim16_to_cpu() 84 static inline __virtio16 cpu_to_vdpasim16(struct vdpasim *vdpasim, u16 val) in cpu_to_vdpasim16() argument [all …]
|
| D | vdpa_sim_blk.c | 61 static bool vdpasim_blk_handle_req(struct vdpasim *vdpasim, in vdpasim_blk_handle_req() argument 79 dev_err(&vdpasim->vdpa.dev, "missing headers - out_iov: %u in_iov %u\n", in vdpasim_blk_handle_req() 85 dev_err(&vdpasim->vdpa.dev, "request in header too short\n"); in vdpasim_blk_handle_req() 99 dev_err(&vdpasim->vdpa.dev, "request out header too short\n"); in vdpasim_blk_handle_req() 105 type = vdpasim32_to_cpu(vdpasim, hdr.type); in vdpasim_blk_handle_req() 106 sector = vdpasim64_to_cpu(vdpasim, hdr.sector); in vdpasim_blk_handle_req() 113 dev_err(&vdpasim->vdpa.dev, in vdpasim_blk_handle_req() 121 vdpasim->buffer + offset, in vdpasim_blk_handle_req() 124 dev_err(&vdpasim->vdpa.dev, in vdpasim_blk_handle_req() 136 dev_err(&vdpasim->vdpa.dev, in vdpasim_blk_handle_req() [all …]
|
| D | vdpa_sim_net.c | 40 struct vdpasim *vdpasim = container_of(work, struct vdpasim, work); in vdpasim_net_work() local 41 struct vdpasim_virtqueue *txq = &vdpasim->vqs[1]; in vdpasim_net_work() 42 struct vdpasim_virtqueue *rxq = &vdpasim->vqs[0]; in vdpasim_net_work() 48 spin_lock(&vdpasim->lock); in vdpasim_net_work() 50 if (!(vdpasim->status & VIRTIO_CONFIG_S_DRIVER_OK)) in vdpasim_net_work() 72 vdpasim->buffer, in vdpasim_net_work() 78 vdpasim->buffer, read); in vdpasim_net_work() 102 schedule_work(&vdpasim->work); in vdpasim_net_work() 108 spin_unlock(&vdpasim->lock); in vdpasim_net_work() 111 static void vdpasim_net_get_config(struct vdpasim *vdpasim, void *config) in vdpasim_net_get_config() argument [all …]
|