diff options
author | Marc-André Lureau | 2015-10-09 17:17:23 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2015-10-22 13:34:49 +0200 |
commit | c2bea314f6a2870b847c79e2e11263c5f9334db7 (patch) | |
tree | 4c59a51399045a2e0dab678f2f02f53bbdd6eded /hw/virtio/vhost.c | |
parent | vhost: document log resizing (diff) | |
download | qemu-c2bea314f6a2870b847c79e2e11263c5f9334db7.tar.gz qemu-c2bea314f6a2870b847c79e2e11263c5f9334db7.tar.xz qemu-c2bea314f6a2870b847c79e2e11263c5f9334db7.zip |
vhost: add vhost_set_log_base op
Split VHOST_SET_LOG_BASE call in a seperate function callback, so that
type safety works and more arguments can be added in the next patches.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Thibaut Collet <thibaut.collet@6wind.com>
Diffstat (limited to 'hw/virtio/vhost.c')
-rw-r--r-- | hw/virtio/vhost.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index f5ecaf0d02..f2b31b7d12 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -352,7 +352,7 @@ static inline void vhost_dev_log_resize(struct vhost_dev* dev, uint64_t size) /* inform backend of log switching, this must be done before releasing the current log, to ensure no logging is lost */ - r = dev->vhost_ops->vhost_call(dev, VHOST_SET_LOG_BASE, &log_base); + r = dev->vhost_ops->vhost_set_log_base(dev, log_base); assert(r >= 0); vhost_log_put(dev, true); dev->log = log; @@ -1167,8 +1167,8 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev) hdev->log_size = vhost_get_log_size(hdev); hdev->log = vhost_log_get(hdev->log_size); log_base = (uintptr_t)hdev->log->log; - r = hdev->vhost_ops->vhost_call(hdev, VHOST_SET_LOG_BASE, - hdev->log_size ? &log_base : NULL); + r = hdev->vhost_ops->vhost_set_log_base(hdev, + hdev->log_size ? log_base : 0); if (r < 0) { r = -errno; goto fail_log; |