[PATCH v3 25/28] vhost: add support for VDUSE IOTLB update event
Xia, Chenbo
chenbo.xia at intel.com
Mon May 29 08:52:07 CEST 2023
> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin at redhat.com>
> Sent: Friday, May 26, 2023 12:26 AM
> To: dev at dpdk.org; Xia, Chenbo <chenbo.xia at intel.com>;
> david.marchand at redhat.com; mkp at redhat.com; fbl at redhat.com;
> jasowang at redhat.com; Liang, Cunming <cunming.liang at intel.com>; Xie, Yongji
> <xieyongji at bytedance.com>; echaudro at redhat.com; eperezma at redhat.com;
> amorenoz at redhat.com; lulu at redhat.com
> Cc: Maxime Coquelin <maxime.coquelin at redhat.com>
> Subject: [PATCH v3 25/28] vhost: add support for VDUSE IOTLB update event
>
> This patch adds support for VDUSE_UPDATE_IOTLB event
> handling, which consists in invaliding IOTLB entries for
> the range specified in the request.
>
> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> ---
> lib/vhost/vduse.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c
> index 3bf65d4b8b..110654ec68 100644
> --- a/lib/vhost/vduse.c
> +++ b/lib/vhost/vduse.c
> @@ -179,6 +179,13 @@ vduse_events_handler(int fd, void *arg, int *remove
> __rte_unused)
> dev->status = req.s.status;
> resp.result = VDUSE_REQ_RESULT_OK;
> break;
> + case VDUSE_UPDATE_IOTLB:
> + VHOST_LOG_CONFIG(dev->ifname, INFO, "\tIOVA range: %" PRIx64 "
> - %" PRIx64 "\n",
> + (uint64_t)req.iova.start, (uint64_t)req.iova.last);
> + vhost_user_iotlb_cache_remove(dev, req.iova.start,
> + req.iova.last - req.iova.start + 1);
> + resp.result = VDUSE_REQ_RESULT_OK;
> + break;
> default:
> resp.result = VDUSE_REQ_RESULT_FAILED;
> break;
> --
> 2.40.1
Reviewed-by: Chenbo Xia <chenbo.xia at intel.com>
More information about the dev
mailing list