diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2017-02-22 16:37:33 +0000 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2017-03-02 07:14:27 +0200 |
commit | 3cdf847329a9911780372e6d8239839446d09d9f (patch) | |
tree | 4141939f3d23e00a7220667e0a060922dce162d1 /hw | |
parent | 34c6bf22a8d9b60c513df151aa0a791ef53bf81d (diff) | |
download | qemu-3cdf847329a9911780372e6d8239839446d09d9f.zip qemu-3cdf847329a9911780372e6d8239839446d09d9f.tar.gz qemu-3cdf847329a9911780372e6d8239839446d09d9f.tar.bz2 |
virtio: invalidate memory in vring_set_avail_event()
Remember to invalidate the avail event field so the memory pages are
marked dirty.
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/virtio/virtio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index bf8a644..294c909 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -282,6 +282,7 @@ static inline void vring_set_avail_event(VirtQueue *vq, uint16_t val) caches = atomic_rcu_read(&vq->vring.caches); pa = offsetof(VRingUsed, ring[vq->vring.num]); virtio_stw_phys_cached(vq->vdev, &caches->used, pa, val); + address_space_cache_invalidate(&caches->used, pa, sizeof(val)); } void virtio_queue_set_notification(VirtQueue *vq, int enable) |