qemu-patch-raspberry4/hw/virtio
Michael S. Tsirkin 8347c53243 dataplane: support non-contigious s/g
bring_map currently fails if one of the entries it's mapping is
contigious in GPA but not HVA address space.  Introduce a mapped_len
parameter so it can handle this, returning the actual mapped length.

This will still fail if there's no space left in the sg, but luckily max
queue size in use is currently 256, while max sg size is 1024, so we
should be OK even is all entries happen to cross a single DIMM boundary.

Won't work well with very small DIMM sizes, unfortunately:
e.g. this will fail with 4K DIMMs where a single
request might span a large number of DIMMs.

Let's hope these are uncommon - at least we are not breaking things.

Reported-by: Stefan Hajnoczi <stefanha@redhat.com>
Reported-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Igor Mammedov <imammedo@redhat.com>
Message-id: 1446047243-3221-2-git-send-email-mst@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-11-09 09:59:32 +00:00
..
dataplane dataplane: support non-contigious s/g 2015-11-09 09:59:32 +00:00
Makefile.objs dataplane: endianness-aware accesses 2015-02-16 15:07:16 +00:00
vhost-backend.c vhost: use a function for each call 2015-10-22 14:34:49 +03:00
vhost-user.c vhost-user: cleanup msg size math 2015-10-29 11:05:24 +02:00
vhost.c vhost: set the correct queue index in case of migration with multiqueue 2015-10-22 14:34:50 +03:00
virtio-balloon.c virtio: avoid leading underscores for helpers 2015-09-10 11:06:05 +03:00
virtio-bus.c virtio: get_features() can fail 2015-07-27 18:11:53 +03:00
virtio-mmio.c virtio: allow virtio-1 queue layout 2015-06-10 18:15:04 +02:00
virtio-pci.c kvm: Pass PCI device pointer to MSI routing functions 2015-10-19 10:13:07 +02:00
virtio-pci.h virtio-input: Fix device introspection on non-Linux hosts 2015-10-09 15:25:56 +02:00
virtio-rng.c virtio: get_features() can fail 2015-07-27 18:11:53 +03:00
virtio.c virtio: drop virtqueue_map_sg 2015-10-29 11:05:24 +02:00