]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
drivers/virtio/ring: Add basic support for modern virtio
authorMichalis Pappas <michalis@unikraft.io>
Wed, 20 Sep 2023 16:24:47 +0000 (18:24 +0200)
committerRazvan Deaconescu <razvand@unikraft.io>
Fri, 20 Oct 2023 16:35:55 +0000 (19:35 +0300)
This commit adds the minimum set of changes required for modern virtio
support.

Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Andrei Topala <topala.andrei@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

drivers/virtio/ring/virtio_ring.c

index d0883b2163e2e5a955722076aa180ff5403aa65c..1cdcc89bff8edd4c3280ecef1b4307a0571efa1a 100644 (file)
@@ -233,10 +233,9 @@ __u64 virtqueue_feature_negotiate(__u64 feature_set)
 {
        __u64 feature = (1ULL << VIRTIO_TRANSPORT_F_START) - 1;
 
-       /**
-        * Currently out vring driver does not support any ring feature. We will
-        * add support to transport feature in the future.
-        */
+       /* Allow version 1 flag */
+       feature |= 1ULL << VIRTIO_F_VERSION_1;
+
        feature &= feature_set;
        return feature;
 }