• Home
  • Raw
  • Download

Lines Matching refs:vdev

46 	struct virtio_device vdev;  member
57 #define to_lgdev(vd) container_of(vd, struct lguest_device, vdev)
97 static u32 lg_get_features(struct virtio_device *vdev) in lg_get_features() argument
101 struct lguest_device_desc *desc = to_lgdev(vdev)->desc; in lg_get_features()
116 static void status_notify(struct virtio_device *vdev) in status_notify() argument
118 unsigned long offset = (void *)to_lgdev(vdev)->desc - lguest_devices; in status_notify()
129 static void lg_finalize_features(struct virtio_device *vdev) in lg_finalize_features() argument
132 struct lguest_device_desc *desc = to_lgdev(vdev)->desc; in lg_finalize_features()
137 vring_transport_features(vdev); in lg_finalize_features()
145 bits = min_t(unsigned, desc->feature_len, sizeof(vdev->features)) * 8; in lg_finalize_features()
147 if (test_bit(i, vdev->features)) in lg_finalize_features()
152 status_notify(vdev); in lg_finalize_features()
156 static void lg_get(struct virtio_device *vdev, unsigned int offset, in lg_get() argument
159 struct lguest_device_desc *desc = to_lgdev(vdev)->desc; in lg_get()
167 static void lg_set(struct virtio_device *vdev, unsigned int offset, in lg_set() argument
170 struct lguest_device_desc *desc = to_lgdev(vdev)->desc; in lg_set()
181 static u8 lg_get_status(struct virtio_device *vdev) in lg_get_status() argument
183 return to_lgdev(vdev)->desc->status; in lg_get_status()
186 static void lg_set_status(struct virtio_device *vdev, u8 status) in lg_set_status() argument
189 to_lgdev(vdev)->desc->status = status; in lg_set_status()
193 status_notify(vdev); in lg_set_status()
196 static void lg_reset(struct virtio_device *vdev) in lg_reset() argument
199 to_lgdev(vdev)->desc->status = 0; in lg_reset()
200 status_notify(vdev); in lg_reset()
257 static struct virtqueue *lg_find_vq(struct virtio_device *vdev, in lg_find_vq() argument
262 struct lguest_device *ldev = to_lgdev(vdev); in lg_find_vq()
303 vq = vring_new_virtqueue(index, lvq->config.num, LGUEST_VRING_ALIGN, vdev, in lg_find_vq()
324 dev_name(&vdev->dev), vq); in lg_find_vq()
362 static void lg_del_vqs(struct virtio_device *vdev) in lg_del_vqs() argument
366 list_for_each_entry_safe(vq, n, &vdev->vqs, list) in lg_del_vqs()
370 static int lg_find_vqs(struct virtio_device *vdev, unsigned nvqs, in lg_find_vqs() argument
375 struct lguest_device *ldev = to_lgdev(vdev); in lg_find_vqs()
383 vqs[i] = lg_find_vq(vdev, i, callbacks[i], names[i]); in lg_find_vqs()
390 lg_del_vqs(vdev); in lg_find_vqs()
394 static const char *lg_bus_name(struct virtio_device *vdev) in lg_bus_name() argument
445 ldev->vdev.dev.parent = lguest_root; in add_lguest_device()
451 ldev->vdev.id.device = d->type; in add_lguest_device()
456 ldev->vdev.config = &lguest_config_ops; in add_lguest_device()
465 if (register_virtio_device(&ldev->vdev) != 0) { in add_lguest_device()