From: Michalis Pappas Date: Wed, 20 Sep 2023 16:24:47 +0000 (+0200) Subject: drivers/virtio/ring: Add basic support for modern virtio X-Git-Tag: RELEASE-0.15.0~102 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=00970e1079176f0d7332e0676b9830ff278529f6;p=unikraft%2Funikraft.git drivers/virtio/ring: Add basic support for modern virtio This commit adds the minimum set of changes required for modern virtio support. Signed-off-by: Marco Schlumpp Signed-off-by: Michalis Pappas Reviewed-by: Andrei Topala Approved-by: Razvan Deaconescu GitHub-Closes: #1115 --- diff --git a/drivers/virtio/ring/virtio_ring.c b/drivers/virtio/ring/virtio_ring.c index d0883b216..1cdcc89bf 100644 --- a/drivers/virtio/ring/virtio_ring.c +++ b/drivers/virtio/ring/virtio_ring.c @@ -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; }