[PATCH v5 2/9] vhost: introduce ASID support
Maxime Coquelin
maxime.coquelin at redhat.com
Mon Oct 19 16:43:51 CEST 2026
On Mon, Oct 19, 2026 at 3:48 PM Eugenio Pérez <eperezma at redhat.com> wrote:
>
> From: Maxime Coquelin <maxime.coquelin at redhat.com>
>
> Set all ASID = 0 as it is the default when not set explicitly.
>
> Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> Signed-off-by: Eugenio Pérez <eperezma at redhat.com>
> ---
> lib/vhost/iotlb.c | 233 +++++++++++++++++++++++++----------------
> lib/vhost/iotlb.h | 14 +--
> lib/vhost/vduse.c | 9 +-
> lib/vhost/vhost.c | 16 +--
> lib/vhost/vhost.h | 13 +--
> lib/vhost/vhost_user.c | 13 +--
> 6 files changed, 177 insertions(+), 121 deletions(-)
>
> diff --git a/lib/vhost/iotlb.c b/lib/vhost/iotlb.c
> index f2c275a7d77e..e5e69d11cb65 100644
> --- a/lib/vhost/iotlb.c
> +++ b/lib/vhost/iotlb.c
> @@ -11,6 +11,16 @@
> #include "iotlb.h"
> #include "vhost.h"
>
> +struct iotlb {
I'm changing to struct vhost_iotlb, for consistency with vhost_iotlb
entry and also to avoid potential collision in the future.
> + rte_rwlock_t pending_lock;
> + struct vhost_iotlb_entry *pool;
> + TAILQ_HEAD(, vhost_iotlb_entry) list;
> + TAILQ_HEAD(, vhost_iotlb_entry) pending_list;
> + int cache_nr;
> + rte_spinlock_t free_lock;
> + SLIST_HEAD(, vhost_iotlb_entry) free_list;
> +};
> +
More information about the dev
mailing list