Jason Wang f463e761a4 virtio: use virtio accessor to access packed descriptor flags
We used to access packed descriptor flags via
address_space_{write|read}_cached(). When we hit the cache, memcpy()
is used which is not an atomic operation which may lead a wrong value
is read or wrote.

So this patch switches to use virito_{stw|lduw}_phys_cached() to make
sure the aceess is atomic.

Fixes: 86044b24e865f ("virtio: basic packed virtqueue support")
Cc: qemu-stable@nongnu.org
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20211111063854.29060-1-jasowang@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2021-11-15 09:44:46 -05:00
..
2021-10-27 14:45:22 +02:00
2021-10-12 08:20:08 +02:00
2021-11-09 10:11:27 +01:00
2021-11-05 11:32:00 +08:00
2021-10-12 08:20:08 +02:00
2021-11-09 10:11:27 +01:00
2021-11-09 13:16:56 +01:00
2021-10-18 00:41:36 +02:00
2021-11-09 10:11:27 +01:00
2021-11-02 14:14:55 -04:00