Searched refs:vdpasim (Results 1 – 4 of 4) sorted by relevance
/linux-5.19.10/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 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 73 struct vdpasim *vdpasim_create(struct vdpasim_dev_attr *attr); argument 76 static inline bool vdpasim_is_little_endian(struct vdpasim *vdpasim) in vdpasim_is_little_endian() argument 79 (vdpasim->features & (1ULL << VIRTIO_F_VERSION_1)); in vdpasim_is_little_endian() 82 static inline u16 vdpasim16_to_cpu(struct vdpasim *vdpasim, __virtio16 val) in vdpasim16_to_cpu() argument 84 return __virtio16_to_cpu(vdpasim_is_little_endian(vdpasim), val); in vdpasim16_to_cpu() 87 static inline __virtio16 cpu_to_vdpasim16(struct vdpasim *vdpasim, u16 val) in cpu_to_vdpasim16() argument [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 …]
|
D | vdpa_sim_blk.c | 65 static bool vdpasim_blk_handle_req(struct vdpasim *vdpasim, in vdpasim_blk_handle_req() argument 83 dev_err(&vdpasim->vdpa.dev, "missing headers - out_iov: %u in_iov %u\n", in vdpasim_blk_handle_req() 89 dev_err(&vdpasim->vdpa.dev, "request in header too short\n"); in vdpasim_blk_handle_req() 103 dev_err(&vdpasim->vdpa.dev, "request out header too short\n"); in vdpasim_blk_handle_req() 109 type = vdpasim32_to_cpu(vdpasim, hdr.type); in vdpasim_blk_handle_req() 110 sector = vdpasim64_to_cpu(vdpasim, hdr.sector); in vdpasim_blk_handle_req() 117 dev_err(&vdpasim->vdpa.dev, in vdpasim_blk_handle_req() 125 vdpasim->buffer + offset, in vdpasim_blk_handle_req() 128 dev_err(&vdpasim->vdpa.dev, in vdpasim_blk_handle_req() 140 dev_err(&vdpasim->vdpa.dev, in vdpasim_blk_handle_req() [all …]
|