virtio: Add vhost_svq_get_vring_addr
authorEugenio Pérez <eperezma@redhat.com>
Mon, 14 Mar 2022 17:34:45 +0000 (18:34 +0100)
committerJason Wang <jasowang@redhat.com>
Tue, 15 Mar 2022 05:57:44 +0000 (13:57 +0800)
commitdafb34c9926a38b3bfc4ab8f35a99ca1c706648c
tree8e9470efd57e9f72ecdabcd6d4440acffafb865b
parent4725a4181b0fd5b646c51f079d7eac753b14b094
virtio: Add vhost_svq_get_vring_addr

It reports the shadow virtqueue address from qemu virtual address space.

Since this will be different from the guest's vaddr, but the device can
access it, SVQ takes special care about its alignment & lack of garbage
data. It assumes that IOMMU will work in host_page_size ranges for that.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/virtio/vhost-shadow-virtqueue.c
hw/virtio/vhost-shadow-virtqueue.h