qemu-patch-raspberry4/hw/virtio
Greg Kurz f1f9e6c596 vhost: adapt vhost_verify_ring_mappings() to virtio 1 ring layout
With virtio 1, the vring layout is split in 3 separate regions of
contiguous memory for the descriptor table, the available ring and the
used ring, as opposed with legacy virtio which uses a single region.

In case of memory re-mapping, the code ensures it doesn't affect the
vring mapping. This is done in vhost_verify_ring_mappings() which assumes
the device is legacy.

This patch changes vhost_verify_ring_mappings() to check the mappings of
each part of the vring separately.

This works for legacy mappings as well.

Cc: qemu-stable@nongnu.org
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-11-15 17:20:38 +02:00
..
Makefile.objs virtio-crypto-pci: add virtio crypto pci support 2016-11-01 19:21:08 +02:00
trace-events trace: move hw/virtio/virtio-balloon.c trace points into correct file 2016-09-28 19:17:55 +01:00
vhost-backend.c vhost-vsock: add virtio sockets device 2016-09-10 00:28:08 +03:00
vhost-user.c char: use qemu_chr_fe* functions with CharBackend argument 2016-10-24 15:27:21 +02:00
vhost-vsock.c virtio: cleanup VMSTATE_VIRTIO_DEVICE 2016-10-10 02:21:43 +03:00
vhost.c vhost: adapt vhost_verify_ring_mappings() to virtio 1 ring layout 2016-11-15 17:20:38 +02:00
virtio-balloon.c virtio: rename virtqueue_discard to virtqueue_unpop 2016-11-15 17:20:36 +02:00
virtio-bus.c virtio: inline set_host_notifier_internal 2016-10-30 20:06:21 +02:00
virtio-crypto-pci.c virtio-crypto: tag as not hotpluggable and migration 2016-11-15 17:20:36 +02:00
virtio-crypto.c virtio-crypto: tag as not hotpluggable and migration 2016-11-15 17:20:36 +02:00
virtio-mmio.c virtio: introduce virtio_device_ioeventfd_enabled 2016-10-30 19:51:32 +02:00
virtio-pci.c virtio: allow per-device-class legacy features 2016-11-15 17:20:36 +02:00
virtio-pci.h virtio-crypto-pci: add virtio crypto pci support 2016-11-01 19:21:08 +02:00
virtio-rng.c virtio: cleanup VMSTATE_VIRTIO_DEVICE 2016-10-10 02:21:43 +03:00
virtio.c virtio: allow per-device-class legacy features 2016-11-15 17:20:36 +02:00