OSDN Git Service

Add helper to populate vhost-user message regions
authorRaphael Norwitz <raphael.norwitz@nutanix.com>
Thu, 21 May 2020 05:00:26 +0000 (05:00 +0000)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 9 Jun 2020 18:18:04 +0000 (14:18 -0400)
commitece99091c2d0aeb23734289a50ef2ff4e0a08929
treee312ee1c247817535f707fd612abaff4b5aa1652
parent4bcad76f4c390f798198a9a93fbaa1a20d06b73e
Add helper to populate vhost-user message regions

When setting vhost-user memory tables, memory region descriptors must be
copied from the vhost_dev struct to the vhost-user message. To avoid
duplicating code in setting the memory tables, we should use a helper to
populate this field. This change adds this helper.

Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <1588533678-23450-2-git-send-email-raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
hw/virtio/vhost-user.c