aboutsummaryrefslogtreecommitdiff
path: root/tests/libqos/virtio.h
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2019-10-23 11:04:16 +0100
committerMichael S. Tsirkin <mst@redhat.com>2019-10-25 07:46:22 -0400
commit56140fbb8f2bb717eb2670aa1056aeaefe8b0246 (patch)
treed976fd447f5688d0f2cb2b8036364e5bfdbf0285 /tests/libqos/virtio.h
parentc5bd6d02e6eb6ae868abbcbeb5c3a3be8c5379a5 (diff)
downloadqemu-56140fbb8f2bb717eb2670aa1056aeaefe8b0246.zip
qemu-56140fbb8f2bb717eb2670aa1056aeaefe8b0246.tar.gz
qemu-56140fbb8f2bb717eb2670aa1056aeaefe8b0246.tar.bz2
libqos: enforce Device Initialization order
According to VIRTIO 1.1 "3.1.1 Driver Requirements: Device Initialization", configuration space and virtqueues cannot be accessed before features have been negotiated. Enforce this requirement. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20191023100425.12168-8-stefanha@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/libqos/virtio.h')
-rw-r--r--tests/libqos/virtio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/libqos/virtio.h b/tests/libqos/virtio.h
index a5c99fb..0e8f823 100644
--- a/tests/libqos/virtio.h
+++ b/tests/libqos/virtio.h
@@ -23,6 +23,7 @@ typedef struct QVirtioDevice {
uint16_t device_type;
uint64_t features;
bool big_endian;
+ bool features_negotiated;
} QVirtioDevice;
typedef struct QVirtQueue {