Skip to contentSkip to conversation

fixup! virtio: add legacy feature table support

PATCH New Michael S. Tsirkin 1 participant 1 message Oct 23, 2014 virtio core

lore
Share & tools
lore

Michael S. Tsirkin

author maintainer
#0 lore raw

PATCH 1/1 fixup! virtio: add legacy feature table support

the following is needed on top of v4 virtio 1.0 support that I sent. Will squash it in for v5.

---
 drivers/virtio/virtio.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/virtio/virtio.c +7 -0
index 85a164e..e9018b4 100644
@@ -113,6 +113,13 @@ void virtio_check_driver_offered_feature(const struct virtio_device *vdev,
 	for (i = 0; i < drv->feature_table_size; i++)
 		if (drv->feature_table[i] == fbit)
 			return;
+
+	if (drv->feature_table_legacy) {
+		for (i = 0; i < drv->feature_table_size_legacy; i++)
+			if (drv->feature_table_legacy[i] == fbit)
+				return;
+	}
+
 	BUG();
 }
 EXPORT_SYMBOL_GPL(virtio_check_driver_offered_feature);
Signature · 1 line
MST