diff options
| author | Maxime Coquelin <maxime.coquelin@redhat.com> | 2017-06-02 12:18:28 +0200 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2017-06-02 18:57:17 +0300 |
| commit | 020e571b8bf90e022bbb78346e189f0f26e4675f (patch) | |
| tree | 4ba3ebdf103587568856399eed662cccfeea173e /hw/virtio/vhost.c | |
| parent | fc58bd0d97c41dc3257001c86b2f802ae7255dff (diff) | |
| download | focaccia-qemu-020e571b8bf90e022bbb78346e189f0f26e4675f.tar.gz focaccia-qemu-020e571b8bf90e022bbb78346e189f0f26e4675f.zip | |
vhost: rework IOTLB messaging
This patch reworks IOTLB messaging to prepare for vhost-user device IOTLB support. IOTLB messages handling is extracted from vhost-kernel backend, so that only the messages transport remains backend specifics. Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio/vhost.c')
| -rw-r--r-- | hw/virtio/vhost.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 8fab12d5f1..6eddb099b0 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -724,8 +724,8 @@ static void vhost_iommu_unmap_notify(IOMMUNotifier *n, IOMMUTLBEntry *iotlb) struct vhost_dev *hdev = iommu->hdev; hwaddr iova = iotlb->iova + iommu->iommu_offset; - if (hdev->vhost_ops->vhost_invalidate_device_iotlb(hdev, iova, - iotlb->addr_mask + 1)) { + if (vhost_backend_invalidate_device_iotlb(hdev, iova, + iotlb->addr_mask + 1)) { error_report("Fail to invalidate device iotlb"); } } @@ -993,8 +993,8 @@ int vhost_device_iotlb_miss(struct vhost_dev *dev, uint64_t iova, int write) len = MIN(iotlb.addr_mask + 1, len); iova = iova & ~iotlb.addr_mask; - ret = dev->vhost_ops->vhost_update_device_iotlb(dev, iova, uaddr, - len, iotlb.perm); + ret = vhost_backend_update_device_iotlb(dev, iova, uaddr, + len, iotlb.perm); if (ret) { error_report("Fail to update device iotlb"); goto out; |