GNU Linux-libre 4.9.317-gnu1
[releases.git] / net / vmw_vsock / virtio_transport.c
1 /*
2  * virtio transport for vsock
3  *
4  * Copyright (C) 2013-2015 Red Hat, Inc.
5  * Author: Asias He <asias@redhat.com>
6  *         Stefan Hajnoczi <stefanha@redhat.com>
7  *
8  * Some of the code is take from Gerd Hoffmann <kraxel@redhat.com>'s
9  * early virtio-vsock proof-of-concept bits.
10  *
11  * This work is licensed under the terms of the GNU GPL, version 2.
12  */
13 #include <linux/spinlock.h>
14 #include <linux/module.h>
15 #include <linux/list.h>
16 #include <linux/atomic.h>
17 #include <linux/virtio.h>
18 #include <linux/virtio_ids.h>
19 #include <linux/virtio_config.h>
20 #include <linux/virtio_vsock.h>
21 #include <net/sock.h>
22 #include <linux/mutex.h>
23 #include <net/af_vsock.h>
24
25 static struct workqueue_struct *virtio_vsock_workqueue;
26 static struct virtio_vsock *the_virtio_vsock;
27 static DEFINE_MUTEX(the_virtio_vsock_mutex); /* protects the_virtio_vsock */
28
29 struct virtio_vsock {
30         struct virtio_device *vdev;
31         struct virtqueue *vqs[VSOCK_VQ_MAX];
32
33         /* Virtqueue processing is deferred to a workqueue */
34         struct work_struct tx_work;
35         struct work_struct rx_work;
36         struct work_struct event_work;
37
38         /* The following fields are protected by tx_lock.  vqs[VSOCK_VQ_TX]
39          * must be accessed with tx_lock held.
40          */
41         struct mutex tx_lock;
42         bool tx_run;
43
44         struct work_struct send_pkt_work;
45         spinlock_t send_pkt_list_lock;
46         struct list_head send_pkt_list;
47
48         atomic_t queued_replies;
49
50         /* The following fields are protected by rx_lock.  vqs[VSOCK_VQ_RX]
51          * must be accessed with rx_lock held.
52          */
53         struct mutex rx_lock;
54         bool rx_run;
55         int rx_buf_nr;
56         int rx_buf_max_nr;
57
58         /* The following fields are protected by event_lock.
59          * vqs[VSOCK_VQ_EVENT] must be accessed with event_lock held.
60          */
61         struct mutex event_lock;
62         bool event_run;
63         struct virtio_vsock_event event_list[8];
64
65         u32 guest_cid;
66 };
67
68 static u32 virtio_transport_get_local_cid(void)
69 {
70         struct virtio_vsock *vsock;
71         u32 ret;
72
73         rcu_read_lock();
74         vsock = rcu_dereference(the_virtio_vsock);
75         if (!vsock) {
76                 ret = VMADDR_CID_ANY;
77                 goto out_rcu;
78         }
79
80         ret = vsock->guest_cid;
81 out_rcu:
82         rcu_read_unlock();
83         return ret;
84 }
85
86 static void
87 virtio_transport_send_pkt_work(struct work_struct *work)
88 {
89         struct virtio_vsock *vsock =
90                 container_of(work, struct virtio_vsock, send_pkt_work);
91         struct virtqueue *vq;
92         bool added = false;
93         bool restart_rx = false;
94
95         mutex_lock(&vsock->tx_lock);
96
97         if (!vsock->tx_run)
98                 goto out;
99
100         vq = vsock->vqs[VSOCK_VQ_TX];
101
102         for (;;) {
103                 struct virtio_vsock_pkt *pkt;
104                 struct scatterlist hdr, buf, *sgs[2];
105                 int ret, in_sg = 0, out_sg = 0;
106                 bool reply;
107
108                 spin_lock_bh(&vsock->send_pkt_list_lock);
109                 if (list_empty(&vsock->send_pkt_list)) {
110                         spin_unlock_bh(&vsock->send_pkt_list_lock);
111                         break;
112                 }
113
114                 pkt = list_first_entry(&vsock->send_pkt_list,
115                                        struct virtio_vsock_pkt, list);
116                 list_del_init(&pkt->list);
117                 spin_unlock_bh(&vsock->send_pkt_list_lock);
118
119                 reply = pkt->reply;
120
121                 sg_init_one(&hdr, &pkt->hdr, sizeof(pkt->hdr));
122                 sgs[out_sg++] = &hdr;
123                 if (pkt->buf) {
124                         sg_init_one(&buf, pkt->buf, pkt->len);
125                         sgs[out_sg++] = &buf;
126                 }
127
128                 ret = virtqueue_add_sgs(vq, sgs, out_sg, in_sg, pkt, GFP_KERNEL);
129                 /* Usually this means that there is no more space available in
130                  * the vq
131                  */
132                 if (ret < 0) {
133                         spin_lock_bh(&vsock->send_pkt_list_lock);
134                         list_add(&pkt->list, &vsock->send_pkt_list);
135                         spin_unlock_bh(&vsock->send_pkt_list_lock);
136                         break;
137                 }
138
139                 if (reply) {
140                         struct virtqueue *rx_vq = vsock->vqs[VSOCK_VQ_RX];
141                         int val;
142
143                         val = atomic_dec_return(&vsock->queued_replies);
144
145                         /* Do we now have resources to resume rx processing? */
146                         if (val + 1 == virtqueue_get_vring_size(rx_vq))
147                                 restart_rx = true;
148                 }
149
150                 added = true;
151         }
152
153         if (added)
154                 virtqueue_kick(vq);
155
156 out:
157         mutex_unlock(&vsock->tx_lock);
158
159         if (restart_rx)
160                 queue_work(virtio_vsock_workqueue, &vsock->rx_work);
161 }
162
163 static int
164 virtio_transport_send_pkt(struct virtio_vsock_pkt *pkt)
165 {
166         struct virtio_vsock *vsock;
167         int len = pkt->len;
168
169         rcu_read_lock();
170         vsock = rcu_dereference(the_virtio_vsock);
171         if (!vsock) {
172                 virtio_transport_free_pkt(pkt);
173                 len = -ENODEV;
174                 goto out_rcu;
175         }
176
177         if (pkt->reply)
178                 atomic_inc(&vsock->queued_replies);
179
180         spin_lock_bh(&vsock->send_pkt_list_lock);
181         list_add_tail(&pkt->list, &vsock->send_pkt_list);
182         spin_unlock_bh(&vsock->send_pkt_list_lock);
183
184         queue_work(virtio_vsock_workqueue, &vsock->send_pkt_work);
185
186 out_rcu:
187         rcu_read_unlock();
188         return len;
189 }
190
191 static void virtio_vsock_rx_fill(struct virtio_vsock *vsock)
192 {
193         int buf_len = VIRTIO_VSOCK_DEFAULT_RX_BUF_SIZE;
194         struct virtio_vsock_pkt *pkt;
195         struct scatterlist hdr, buf, *sgs[2];
196         struct virtqueue *vq;
197         int ret;
198
199         vq = vsock->vqs[VSOCK_VQ_RX];
200
201         do {
202                 pkt = kzalloc(sizeof(*pkt), GFP_KERNEL);
203                 if (!pkt)
204                         break;
205
206                 pkt->buf = kmalloc(buf_len, GFP_KERNEL);
207                 if (!pkt->buf) {
208                         virtio_transport_free_pkt(pkt);
209                         break;
210                 }
211
212                 pkt->len = buf_len;
213
214                 sg_init_one(&hdr, &pkt->hdr, sizeof(pkt->hdr));
215                 sgs[0] = &hdr;
216
217                 sg_init_one(&buf, pkt->buf, buf_len);
218                 sgs[1] = &buf;
219                 ret = virtqueue_add_sgs(vq, sgs, 0, 2, pkt, GFP_KERNEL);
220                 if (ret) {
221                         virtio_transport_free_pkt(pkt);
222                         break;
223                 }
224                 vsock->rx_buf_nr++;
225         } while (vq->num_free);
226         if (vsock->rx_buf_nr > vsock->rx_buf_max_nr)
227                 vsock->rx_buf_max_nr = vsock->rx_buf_nr;
228         virtqueue_kick(vq);
229 }
230
231 static void virtio_transport_tx_work(struct work_struct *work)
232 {
233         struct virtio_vsock *vsock =
234                 container_of(work, struct virtio_vsock, tx_work);
235         struct virtqueue *vq;
236         bool added = false;
237
238         vq = vsock->vqs[VSOCK_VQ_TX];
239         mutex_lock(&vsock->tx_lock);
240
241         if (!vsock->tx_run)
242                 goto out;
243
244         do {
245                 struct virtio_vsock_pkt *pkt;
246                 unsigned int len;
247
248                 virtqueue_disable_cb(vq);
249                 while ((pkt = virtqueue_get_buf(vq, &len)) != NULL) {
250                         virtio_transport_free_pkt(pkt);
251                         added = true;
252                 }
253         } while (!virtqueue_enable_cb(vq));
254
255 out:
256         mutex_unlock(&vsock->tx_lock);
257
258         if (added)
259                 queue_work(virtio_vsock_workqueue, &vsock->send_pkt_work);
260 }
261
262 /* Is there space left for replies to rx packets? */
263 static bool virtio_transport_more_replies(struct virtio_vsock *vsock)
264 {
265         struct virtqueue *vq = vsock->vqs[VSOCK_VQ_RX];
266         int val;
267
268         smp_rmb(); /* paired with atomic_inc() and atomic_dec_return() */
269         val = atomic_read(&vsock->queued_replies);
270
271         return val < virtqueue_get_vring_size(vq);
272 }
273
274 static void virtio_transport_rx_work(struct work_struct *work)
275 {
276         struct virtio_vsock *vsock =
277                 container_of(work, struct virtio_vsock, rx_work);
278         struct virtqueue *vq;
279
280         vq = vsock->vqs[VSOCK_VQ_RX];
281
282         mutex_lock(&vsock->rx_lock);
283
284         if (!vsock->rx_run)
285                 goto out;
286
287         do {
288                 virtqueue_disable_cb(vq);
289                 for (;;) {
290                         struct virtio_vsock_pkt *pkt;
291                         unsigned int len;
292
293                         if (!virtio_transport_more_replies(vsock)) {
294                                 /* Stop rx until the device processes already
295                                  * pending replies.  Leave rx virtqueue
296                                  * callbacks disabled.
297                                  */
298                                 goto out;
299                         }
300
301                         pkt = virtqueue_get_buf(vq, &len);
302                         if (!pkt) {
303                                 break;
304                         }
305
306                         vsock->rx_buf_nr--;
307
308                         /* Drop short/long packets */
309                         if (unlikely(len < sizeof(pkt->hdr) ||
310                                      len > sizeof(pkt->hdr) + pkt->len)) {
311                                 virtio_transport_free_pkt(pkt);
312                                 continue;
313                         }
314
315                         pkt->len = len - sizeof(pkt->hdr);
316                         virtio_transport_recv_pkt(pkt);
317                 }
318         } while (!virtqueue_enable_cb(vq));
319
320 out:
321         if (vsock->rx_buf_nr < vsock->rx_buf_max_nr / 2)
322                 virtio_vsock_rx_fill(vsock);
323         mutex_unlock(&vsock->rx_lock);
324 }
325
326 /* event_lock must be held */
327 static int virtio_vsock_event_fill_one(struct virtio_vsock *vsock,
328                                        struct virtio_vsock_event *event)
329 {
330         struct scatterlist sg;
331         struct virtqueue *vq;
332
333         vq = vsock->vqs[VSOCK_VQ_EVENT];
334
335         sg_init_one(&sg, event, sizeof(*event));
336
337         return virtqueue_add_inbuf(vq, &sg, 1, event, GFP_KERNEL);
338 }
339
340 /* event_lock must be held */
341 static void virtio_vsock_event_fill(struct virtio_vsock *vsock)
342 {
343         size_t i;
344
345         for (i = 0; i < ARRAY_SIZE(vsock->event_list); i++) {
346                 struct virtio_vsock_event *event = &vsock->event_list[i];
347
348                 virtio_vsock_event_fill_one(vsock, event);
349         }
350
351         virtqueue_kick(vsock->vqs[VSOCK_VQ_EVENT]);
352 }
353
354 static void virtio_vsock_reset_sock(struct sock *sk)
355 {
356         lock_sock(sk);
357         sk->sk_state = SS_UNCONNECTED;
358         sk->sk_err = ECONNRESET;
359         sk->sk_error_report(sk);
360         release_sock(sk);
361 }
362
363 static void virtio_vsock_update_guest_cid(struct virtio_vsock *vsock)
364 {
365         struct virtio_device *vdev = vsock->vdev;
366         u64 guest_cid;
367
368         vdev->config->get(vdev, offsetof(struct virtio_vsock_config, guest_cid),
369                           &guest_cid, sizeof(guest_cid));
370         vsock->guest_cid = le64_to_cpu(guest_cid);
371 }
372
373 /* event_lock must be held */
374 static void virtio_vsock_event_handle(struct virtio_vsock *vsock,
375                                       struct virtio_vsock_event *event)
376 {
377         switch (le32_to_cpu(event->id)) {
378         case VIRTIO_VSOCK_EVENT_TRANSPORT_RESET:
379                 virtio_vsock_update_guest_cid(vsock);
380                 vsock_for_each_connected_socket(virtio_vsock_reset_sock);
381                 break;
382         }
383 }
384
385 static void virtio_transport_event_work(struct work_struct *work)
386 {
387         struct virtio_vsock *vsock =
388                 container_of(work, struct virtio_vsock, event_work);
389         struct virtqueue *vq;
390
391         vq = vsock->vqs[VSOCK_VQ_EVENT];
392
393         mutex_lock(&vsock->event_lock);
394
395         if (!vsock->event_run)
396                 goto out;
397
398         do {
399                 struct virtio_vsock_event *event;
400                 unsigned int len;
401
402                 virtqueue_disable_cb(vq);
403                 while ((event = virtqueue_get_buf(vq, &len)) != NULL) {
404                         if (len == sizeof(*event))
405                                 virtio_vsock_event_handle(vsock, event);
406
407                         virtio_vsock_event_fill_one(vsock, event);
408                 }
409         } while (!virtqueue_enable_cb(vq));
410
411         virtqueue_kick(vsock->vqs[VSOCK_VQ_EVENT]);
412 out:
413         mutex_unlock(&vsock->event_lock);
414 }
415
416 static void virtio_vsock_event_done(struct virtqueue *vq)
417 {
418         struct virtio_vsock *vsock = vq->vdev->priv;
419
420         if (!vsock)
421                 return;
422         queue_work(virtio_vsock_workqueue, &vsock->event_work);
423 }
424
425 static void virtio_vsock_tx_done(struct virtqueue *vq)
426 {
427         struct virtio_vsock *vsock = vq->vdev->priv;
428
429         if (!vsock)
430                 return;
431         queue_work(virtio_vsock_workqueue, &vsock->tx_work);
432 }
433
434 static void virtio_vsock_rx_done(struct virtqueue *vq)
435 {
436         struct virtio_vsock *vsock = vq->vdev->priv;
437
438         if (!vsock)
439                 return;
440         queue_work(virtio_vsock_workqueue, &vsock->rx_work);
441 }
442
443 static struct virtio_transport virtio_transport = {
444         .transport = {
445                 .get_local_cid            = virtio_transport_get_local_cid,
446
447                 .init                     = virtio_transport_do_socket_init,
448                 .destruct                 = virtio_transport_destruct,
449                 .release                  = virtio_transport_release,
450                 .connect                  = virtio_transport_connect,
451                 .shutdown                 = virtio_transport_shutdown,
452
453                 .dgram_bind               = virtio_transport_dgram_bind,
454                 .dgram_dequeue            = virtio_transport_dgram_dequeue,
455                 .dgram_enqueue            = virtio_transport_dgram_enqueue,
456                 .dgram_allow              = virtio_transport_dgram_allow,
457
458                 .stream_dequeue           = virtio_transport_stream_dequeue,
459                 .stream_enqueue           = virtio_transport_stream_enqueue,
460                 .stream_has_data          = virtio_transport_stream_has_data,
461                 .stream_has_space         = virtio_transport_stream_has_space,
462                 .stream_rcvhiwat          = virtio_transport_stream_rcvhiwat,
463                 .stream_is_active         = virtio_transport_stream_is_active,
464                 .stream_allow             = virtio_transport_stream_allow,
465
466                 .notify_poll_in           = virtio_transport_notify_poll_in,
467                 .notify_poll_out          = virtio_transport_notify_poll_out,
468                 .notify_recv_init         = virtio_transport_notify_recv_init,
469                 .notify_recv_pre_block    = virtio_transport_notify_recv_pre_block,
470                 .notify_recv_pre_dequeue  = virtio_transport_notify_recv_pre_dequeue,
471                 .notify_recv_post_dequeue = virtio_transport_notify_recv_post_dequeue,
472                 .notify_send_init         = virtio_transport_notify_send_init,
473                 .notify_send_pre_block    = virtio_transport_notify_send_pre_block,
474                 .notify_send_pre_enqueue  = virtio_transport_notify_send_pre_enqueue,
475                 .notify_send_post_enqueue = virtio_transport_notify_send_post_enqueue,
476
477                 .set_buffer_size          = virtio_transport_set_buffer_size,
478                 .set_min_buffer_size      = virtio_transport_set_min_buffer_size,
479                 .set_max_buffer_size      = virtio_transport_set_max_buffer_size,
480                 .get_buffer_size          = virtio_transport_get_buffer_size,
481                 .get_min_buffer_size      = virtio_transport_get_min_buffer_size,
482                 .get_max_buffer_size      = virtio_transport_get_max_buffer_size,
483         },
484
485         .send_pkt = virtio_transport_send_pkt,
486 };
487
488 static int virtio_vsock_probe(struct virtio_device *vdev)
489 {
490         vq_callback_t *callbacks[] = {
491                 virtio_vsock_rx_done,
492                 virtio_vsock_tx_done,
493                 virtio_vsock_event_done,
494         };
495         static const char * const names[] = {
496                 "rx",
497                 "tx",
498                 "event",
499         };
500         struct virtio_vsock *vsock = NULL;
501         int ret;
502
503         ret = mutex_lock_interruptible(&the_virtio_vsock_mutex);
504         if (ret)
505                 return ret;
506
507         /* Only one virtio-vsock device per guest is supported */
508         if (rcu_dereference_protected(the_virtio_vsock,
509                                 lockdep_is_held(&the_virtio_vsock_mutex))) {
510                 ret = -EBUSY;
511                 goto out;
512         }
513
514         vsock = kzalloc(sizeof(*vsock), GFP_KERNEL);
515         if (!vsock) {
516                 ret = -ENOMEM;
517                 goto out;
518         }
519
520         vsock->vdev = vdev;
521
522         ret = vsock->vdev->config->find_vqs(vsock->vdev, VSOCK_VQ_MAX,
523                                             vsock->vqs, callbacks, names);
524         if (ret < 0)
525                 goto out;
526
527         virtio_vsock_update_guest_cid(vsock);
528
529         vsock->rx_buf_nr = 0;
530         vsock->rx_buf_max_nr = 0;
531         atomic_set(&vsock->queued_replies, 0);
532
533         mutex_init(&vsock->tx_lock);
534         mutex_init(&vsock->rx_lock);
535         mutex_init(&vsock->event_lock);
536         spin_lock_init(&vsock->send_pkt_list_lock);
537         INIT_LIST_HEAD(&vsock->send_pkt_list);
538         INIT_WORK(&vsock->rx_work, virtio_transport_rx_work);
539         INIT_WORK(&vsock->tx_work, virtio_transport_tx_work);
540         INIT_WORK(&vsock->event_work, virtio_transport_event_work);
541         INIT_WORK(&vsock->send_pkt_work, virtio_transport_send_pkt_work);
542
543         mutex_lock(&vsock->tx_lock);
544         vsock->tx_run = true;
545         mutex_unlock(&vsock->tx_lock);
546
547         mutex_lock(&vsock->rx_lock);
548         virtio_vsock_rx_fill(vsock);
549         vsock->rx_run = true;
550         mutex_unlock(&vsock->rx_lock);
551
552         mutex_lock(&vsock->event_lock);
553         virtio_vsock_event_fill(vsock);
554         vsock->event_run = true;
555         mutex_unlock(&vsock->event_lock);
556
557         vdev->priv = vsock;
558         rcu_assign_pointer(the_virtio_vsock, vsock);
559
560         mutex_unlock(&the_virtio_vsock_mutex);
561         return 0;
562
563 out:
564         kfree(vsock);
565         mutex_unlock(&the_virtio_vsock_mutex);
566         return ret;
567 }
568
569 static void virtio_vsock_remove(struct virtio_device *vdev)
570 {
571         struct virtio_vsock *vsock = vdev->priv;
572         struct virtio_vsock_pkt *pkt;
573
574         mutex_lock(&the_virtio_vsock_mutex);
575
576         vdev->priv = NULL;
577         rcu_assign_pointer(the_virtio_vsock, NULL);
578         synchronize_rcu();
579
580         flush_work(&vsock->rx_work);
581         flush_work(&vsock->tx_work);
582         flush_work(&vsock->event_work);
583         flush_work(&vsock->send_pkt_work);
584
585         /* Reset all connected sockets when the device disappear */
586         vsock_for_each_connected_socket(virtio_vsock_reset_sock);
587
588         /* Stop all work handlers to make sure no one is accessing the device,
589          * so we can safely call vdev->config->reset().
590          */
591         mutex_lock(&vsock->rx_lock);
592         vsock->rx_run = false;
593         mutex_unlock(&vsock->rx_lock);
594
595         mutex_lock(&vsock->tx_lock);
596         vsock->tx_run = false;
597         mutex_unlock(&vsock->tx_lock);
598
599         mutex_lock(&vsock->event_lock);
600         vsock->event_run = false;
601         mutex_unlock(&vsock->event_lock);
602
603         /* Flush all device writes and interrupts, device will not use any
604          * more buffers.
605          */
606         vdev->config->reset(vdev);
607
608         mutex_lock(&vsock->rx_lock);
609         while ((pkt = virtqueue_detach_unused_buf(vsock->vqs[VSOCK_VQ_RX])))
610                 virtio_transport_free_pkt(pkt);
611         mutex_unlock(&vsock->rx_lock);
612
613         mutex_lock(&vsock->tx_lock);
614         while ((pkt = virtqueue_detach_unused_buf(vsock->vqs[VSOCK_VQ_TX])))
615                 virtio_transport_free_pkt(pkt);
616         mutex_unlock(&vsock->tx_lock);
617
618         spin_lock_bh(&vsock->send_pkt_list_lock);
619         while (!list_empty(&vsock->send_pkt_list)) {
620                 pkt = list_first_entry(&vsock->send_pkt_list,
621                                        struct virtio_vsock_pkt, list);
622                 list_del(&pkt->list);
623                 virtio_transport_free_pkt(pkt);
624         }
625         spin_unlock_bh(&vsock->send_pkt_list_lock);
626
627         /* Delete virtqueues and flush outstanding callbacks if any */
628         vdev->config->del_vqs(vdev);
629
630         mutex_unlock(&the_virtio_vsock_mutex);
631
632         kfree(vsock);
633 }
634
635 static struct virtio_device_id id_table[] = {
636         { VIRTIO_ID_VSOCK, VIRTIO_DEV_ANY_ID },
637         { 0 },
638 };
639
640 static unsigned int features[] = {
641 };
642
643 static struct virtio_driver virtio_vsock_driver = {
644         .feature_table = features,
645         .feature_table_size = ARRAY_SIZE(features),
646         .driver.name = KBUILD_MODNAME,
647         .driver.owner = THIS_MODULE,
648         .id_table = id_table,
649         .probe = virtio_vsock_probe,
650         .remove = virtio_vsock_remove,
651 };
652
653 static int __init virtio_vsock_init(void)
654 {
655         int ret;
656
657         virtio_vsock_workqueue = alloc_workqueue("virtio_vsock", 0, 0);
658         if (!virtio_vsock_workqueue)
659                 return -ENOMEM;
660
661         ret = vsock_core_init(&virtio_transport.transport);
662         if (ret)
663                 goto out_wq;
664
665         ret = register_virtio_driver(&virtio_vsock_driver);
666         if (ret)
667                 goto out_vci;
668
669         return 0;
670
671 out_vci:
672         vsock_core_exit();
673 out_wq:
674         destroy_workqueue(virtio_vsock_workqueue);
675         return ret;
676 }
677
678 static void __exit virtio_vsock_exit(void)
679 {
680         unregister_virtio_driver(&virtio_vsock_driver);
681         vsock_core_exit();
682         destroy_workqueue(virtio_vsock_workqueue);
683 }
684
685 module_init(virtio_vsock_init);
686 module_exit(virtio_vsock_exit);
687 MODULE_LICENSE("GPL v2");
688 MODULE_AUTHOR("Asias He");
689 MODULE_DESCRIPTION("virtio transport for vsock");
690 MODULE_DEVICE_TABLE(virtio, id_table);