OSDN Git Service

vdpa/mlx5: Support creating resources with uid == 0
authorEli Cohen <elic@nvidia.com>
Mon, 31 May 2021 16:04:04 +0000 (19:04 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Sat, 3 Jul 2021 08:50:56 +0000 (04:50 -0400)
commite13cd45d352dedac53529fb49e7d7e293f74fb90
treefbb2d24124322b2151e997f73a0d3b40a0fb7101
parent71ab6a7cfbae27f86a3901daab10bfe13b3a1e3a
vdpa/mlx5: Support creating resources with uid == 0

Currently all resources must be created with uid != 0 which is essential
when userspace processes are allocating virtquueue resources. Since this
is a kernel implementation, it is perfectly legal to open resources with
uid == 0.

In case firmware supports, avoid allocating user context.

Signed-off-by: Eli Cohen <elic@nvidia.com>
Link: https://lore.kernel.org/r/20210531160404.31368-1-elic@nvidia.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
drivers/vdpa/mlx5/core/resources.c
include/linux/mlx5/mlx5_ifc.h