Home
last modified time | relevance | path

Searched refs:vdpasim (Results 1 – 4 of 4) sorted by relevance

/openbmc/linux/drivers/vdpa/vdpa_sim/
H A Dvdpa_sim.c49 struct vdpasim *vdpasim; member
58 struct vdpasim *vdpasim = mm_work->vdpasim; in vdpasim_mm_work_fn() local
63 vdpasim->mm_bound = mm_work->mm_to_bind; in vdpasim_mm_work_fn()
66 static void vdpasim_worker_change_mm_sync(struct vdpasim *vdpasim, in vdpasim_worker_change_mm_sync() argument
72 kthread_queue_work(vdpasim->worker, work); in vdpasim_worker_change_mm_sync()
77 static struct vdpasim *vdpa_to_sim(struct vdpa_device *vdpa) in vdpa_to_sim()
79 return container_of(vdpa, struct vdpasim, vdpa); in vdpa_to_sim()
93 static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) in vdpasim_queue_ready() argument
95 struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; in vdpasim_queue_ready()
104 if (use_va && vdpasim->mm_bound) { in vdpasim_queue_ready()
[all …]
H A Dvdpa_sim.h20 struct vdpasim;
47 void (*work_fn)(struct vdpasim *vdpasim);
48 void (*get_config)(struct vdpasim *vdpasim, void *config);
49 void (*set_config)(struct vdpasim *vdpasim, const void *config);
50 int (*get_stats)(struct vdpasim *vdpasim, u16 idx,
53 void (*free)(struct vdpasim *vdpasim);
57 struct vdpasim { struct
80 struct vdpasim *vdpasim_create(struct vdpasim_dev_attr *attr, argument
82 void vdpasim_schedule_work(struct vdpasim *vdpasim);
85 static inline bool vdpasim_is_little_endian(struct vdpasim *vdpasim) in vdpasim_is_little_endian() argument
[all …]
H A Dvdpa_sim_blk.c47 struct vdpasim vdpasim; member
52 static struct vdpasim_blk *sim_to_blk(struct vdpasim *vdpasim) in sim_to_blk() argument
54 return container_of(vdpasim, struct vdpasim_blk, vdpasim); in sim_to_blk()
79 static bool vdpasim_blk_check_range(struct vdpasim *vdpasim, u64 start_sector, in vdpasim_blk_check_range() argument
83 dev_dbg(&vdpasim->vdpa.dev, in vdpasim_blk_check_range()
89 dev_dbg(&vdpasim->vdpa.dev, in vdpasim_blk_check_range()
96 dev_dbg(&vdpasim->vdpa.dev, in vdpasim_blk_check_range()
109 static bool vdpasim_blk_handle_req(struct vdpasim *vdpasim, in vdpasim_blk_handle_req() argument
112 struct vdpasim_blk *blk = sim_to_blk(vdpasim); in vdpasim_blk_handle_req()
129 dev_dbg(&vdpasim->vdpa.dev, "missing headers - out_iov: %u in_iov %u\n", in vdpasim_blk_handle_req()
[all …]
H A Dvdpa_sim_net.c57 struct vdpasim vdpasim; member
64 static struct vdpasim_net *sim_to_net(struct vdpasim *vdpasim) in sim_to_net() argument
66 return container_of(vdpasim, struct vdpasim_net, vdpasim); in sim_to_net()
85 static bool receive_filter(struct vdpasim *vdpasim, size_t len) in receive_filter() argument
87 bool modern = vdpasim->features & (1ULL << VIRTIO_F_VERSION_1); in receive_filter()
90 struct virtio_net_config *vio_config = vdpasim->config; in receive_filter()
91 struct vdpasim_net *net = sim_to_net(vdpasim); in receive_filter()
105 static virtio_net_ctrl_ack vdpasim_handle_ctrl_mac(struct vdpasim *vdpasim, in vdpasim_handle_ctrl_mac() argument
108 struct virtio_net_config *vio_config = vdpasim->config; in vdpasim_handle_ctrl_mac()
109 struct vdpasim_virtqueue *cvq = &vdpasim->vqs[2]; in vdpasim_handle_ctrl_mac()
[all …]