diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2012-04-23 15:46:22 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2012-04-25 10:53:47 +0300 |
commit | a821ce59338c79bb72dc844dd44ea53701965b2b (patch) | |
tree | d742c0d8a81491e83dcd80c58d9d80ee458216f4 /target-arm | |
parent | 92045d80badc43c9f95897aad675dc7ef17a3b3f (diff) | |
download | qemu-a821ce59338c79bb72dc844dd44ea53701965b2b.zip qemu-a821ce59338c79bb72dc844dd44ea53701965b2b.tar.gz qemu-a821ce59338c79bb72dc844dd44ea53701965b2b.tar.bz2 |
virtio: order index/descriptor reads
virtio has the equivalent of:
if (vq->last_avail_index != vring_avail_idx(vq)) {
read descriptor head at vq->last_avail_index;
}
In theory, processor can reorder descriptor head
read to happen speculatively before the index read.
this would trigger the following race:
host descriptor head read <- reads invalid head from ring
guest writes valid descriptor head
guest writes avail index
host avail index read <- observes valid index
as a result host will use an invalid head value.
This was not observed in the field by me but after
the experience with the previous two races
I think it is prudent to address this theoretical race condition.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'target-arm')
0 files changed, 0 insertions, 0 deletions