diff options
author | Jason Wang | 2021-11-29 04:08:41 +0100 |
---|---|---|
committer | Michael S. Tsirkin | 2021-11-29 14:49:36 +0100 |
commit | d3f1f940ebe43403feb1d12e4b5b9236aba50cb9 (patch) | |
tree | bb7477a41060ad923444a1ab5461040581ab7965 /hw/i386/intel_iommu.c | |
parent | virtio-balloon: process all in sgs for free_page_vq (diff) | |
download | qemu-d3f1f940ebe43403feb1d12e4b5b9236aba50cb9.tar.gz qemu-d3f1f940ebe43403feb1d12e4b5b9236aba50cb9.tar.xz qemu-d3f1f940ebe43403feb1d12e4b5b9236aba50cb9.zip |
virtio-balloon: correct used length
Spec said:
"and len the total of bytes written into the buffer."
For inflateq, deflateq and statsq, we don't process in_sg so the used
length should be zero. For free_page_vq, tough the pages could be
changed by the device (in the destination), spec said:
"Note: len is particularly useful for drivers using untrusted buffers:
if a driver does not know exactly how much has been written by the
device, the driver would have to zero the buffer in advance to ensure
no data leakage occurs."
So 0 should be used as well here.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20211129030841.3611-2-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Diffstat (limited to 'hw/i386/intel_iommu.c')
0 files changed, 0 insertions, 0 deletions