virtio: don't mark unaccessed memory as dirty
commit0cea71a207508c2b8f563b2644ac46009832c8f4
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 24 Sep 2012 13:09:30 +0000 (24 15:09 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 28 Sep 2012 10:16:27 +0000 (28 12:16 +0200)
tree34dc05b002e841ab4722bfd15516b908d071f26a
parent6f8fd2530e9a530f237240daf1c981fa5df7f978
virtio: don't mark unaccessed memory as dirty

offset of accessed buffer is calculated using iov_length, so it
can exceed accessed len. If that happens
math in len - offset wraps around, and size becomes wrong.
As real value is 0, so this is harmless but unnecessary.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio.c