[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 06/16] libqos: add missing virtio-9p feature negotiation
From: |
Stefan Hajnoczi |
Subject: |
[PATCH v4 06/16] libqos: add missing virtio-9p feature negotiation |
Date: |
Wed, 23 Oct 2019 11:04:15 +0100 |
VIRTIO Device Initialization requires feature negotiation. The libqos
virtio-9p driver lacks feature negotiation and is therefore
non-compliant.
libqos tests acknowledge all feature bits advertised by the device,
except VIRTIO_F_BAD_FEATURE (which devices use to detect broken
drivers!) and VIRTIO_RING_F_EVENT_IDX (which is not implemented in
libqos and accepting it would break notifications).
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
tests/libqos/virtio-9p.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/libqos/virtio-9p.c b/tests/libqos/virtio-9p.c
index 8c9efce3e1..77dbfb62ad 100644
--- a/tests/libqos/virtio-9p.c
+++ b/tests/libqos/virtio-9p.c
@@ -32,6 +32,12 @@ static void virtio_9p_cleanup(QVirtio9P *interface)
static void virtio_9p_setup(QVirtio9P *interface)
{
+ uint64_t features;
+
+ features = qvirtio_get_features(interface->vdev);
+ features &= ~(QVIRTIO_F_BAD_FEATURE | (1ull << VIRTIO_RING_F_EVENT_IDX));
+ qvirtio_set_features(interface->vdev, features);
+
interface->vq = qvirtqueue_setup(interface->vdev, alloc, 0);
qvirtio_set_driver_ok(interface->vdev);
}
--
2.21.0
- [PATCH v4 00/16] libqos: add VIRTIO PCI 1.0 support, Stefan Hajnoczi, 2019/10/23
- [PATCH v4 01/16] tests/virtio-blk-test: read config space after feature negotiation, Stefan Hajnoczi, 2019/10/23
- [PATCH v4 02/16] libqos: read QVIRTIO_MMIO_VERSION register, Stefan Hajnoczi, 2019/10/23
- [PATCH v4 04/16] virtio-scsi-test: add missing feature negotiation, Stefan Hajnoczi, 2019/10/23
- [PATCH v4 05/16] tests/virtio-blk-test: set up virtqueue after feature negotiation, Stefan Hajnoczi, 2019/10/23
- [PATCH v4 03/16] libqos: extend feature bits to 64-bit, Stefan Hajnoczi, 2019/10/23
- [PATCH v4 06/16] libqos: add missing virtio-9p feature negotiation,
Stefan Hajnoczi <=
- [PATCH v4 07/16] libqos: enforce Device Initialization order, Stefan Hajnoczi, 2019/10/23
- [PATCH v4 08/16] libqos: implement VIRTIO 1.0 FEATURES_OK step, Stefan Hajnoczi, 2019/10/23
- [PATCH v4 10/16] libqos: add iteration support to qpci_find_capability(), Stefan Hajnoczi, 2019/10/23
- [PATCH v4 09/16] libqos: access VIRTIO 1.0 vring in little-endian, Stefan Hajnoczi, 2019/10/23
- [PATCH v4 11/16] libqos: pass full QVirtQueue to set_queue_address(), Stefan Hajnoczi, 2019/10/23
- [PATCH v4 12/16] libqos: add MSI-X callbacks to QVirtioPCIDevice, Stefan Hajnoczi, 2019/10/23
- [PATCH v4 13/16] libqos: expose common virtqueue setup/cleanup functions, Stefan Hajnoczi, 2019/10/23