virtio: device/driver area size calculation refactor for split ring
authorWei Xu <wexu@redhat.com>
Fri, 25 Oct 2019 08:35:21 +0000 (10:35 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 25 Oct 2019 11:46:22 +0000 (07:46 -0400)
commitf90cda636d4d18f691d8e9ff386e222570ff6552
tree9d98c3f095117081e8cf93c8c9471b840f958b19
parenta40dcec9fcbf63bcdc013bb20970651b237203ef
virtio: device/driver area size calculation refactor for split ring

There is slight size difference between split/packed rings.

This is the refactor of split ring as well as a helper to expanding
device and driver area size calculation for packed ring.

Signed-off-by: Wei Xu <wexu@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Message-Id: <20191025083527.30803-3-eperezma@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio.c