Re: [PATCH V6 01/10] Use copy_process in vhost layer

2021-12-17 Thread michael . christie
On 12/17/21 1:26 PM, Eric W. Biederman wrote: > Mike Christie writes: > >> The following patches made over Linus's tree, allow the vhost layer to do >> a copy_process on the thread that does the VHOST_SET_OWNER ioctl like how >> io_uring does a copy_process against its userspace app. This allows

Re: [PATCH V6 01/10] Use copy_process in vhost layer

2021-12-17 Thread Eric W. Biederman
Mike Christie writes: > The following patches made over Linus's tree, allow the vhost layer to do > a copy_process on the thread that does the VHOST_SET_OWNER ioctl like how > io_uring does a copy_process against its userspace app. This allows the > vhost layer's worker threads to inherit

Re: [PATCH V6 10/10] vhost: use user_worker to check RLIMITs

2021-12-17 Thread Eric W. Biederman
Mike Christie writes: > For vhost workers we use the kthread API which inherit's its values from > and checks against the kthreadd thread. This results in the wrong RLIMITs > being checked. This patch has us use the user_worker helpers which will > inherit its values/checks from the thread that

Re: [PATCH V6 06/10] fork: add helpers to clone a process for kernel use

2021-12-17 Thread Eric W. Biederman
Mike Christie writes: > The vhost layer is creating kthreads to execute IO and management > operations. These threads need to share a mm with a userspace thread, > inherit cgroups, and we would like to have the thread accounted for > under the userspace thread's rlimit nproc value so a user

Re: [PATCH V6 05/10] signal: Perfom autoreap for PF_USER_WORKER

2021-12-17 Thread Eric W. Biederman
Mike Christie writes: > Userspace doesn't know about PF_USER_WORKER threads, so it can't do wait > to clean them up. For cases like where qemu will do dynamic/hot add/remove > of vhost devices, then we need to auto reap the thread like was done for > the kthread case, because qemu does not know

[PATCH 10/10] drm/vmwgfx: Replace module-init boiler-plate code with DRM helpers

2021-12-17 Thread Thomas Zimmermann
Remove custom vmwgfx_init() and vmwgfx_exit() functions and initialize the module with DRM_module helpers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 24 +++- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git

[PATCH 06/10] drm/mgag200: Replace module-init boiler-plate code with DRM helpers

2021-12-17 Thread Thomas Zimmermann
Remove custom mgag200_init() and mgag200_exit() functions and initialize the module with DRM_module helpers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mgag200_drv.c | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git

[PATCH 04/10] drm/cirrus: Replace module-init boiler-plate code with DRM helpers

2021-12-17 Thread Thomas Zimmermann
Remove custom cirrus_init() and cirrus_exit() functions and initialize the module with DRM module helpers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tiny/cirrus.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/tiny/cirrus.c

[PATCH 08/10] drm/qxl: Replace module-init boiler-plate code with DRM helpers

2021-12-17 Thread Thomas Zimmermann
Remove custom qxl_init() and qxl_exit() functions and initialize the module with DRM module helpers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_drv.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.c

[PATCH 09/10] drm/vboxvideo: Replace module-init boiler-plate code with DRM helpers

2021-12-17 Thread Thomas Zimmermann
Remove custom vbox_init() and vbox_exit() functions and initialize the module with DRM module helpers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/vboxvideo/vbox_drv.c | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git

[PATCH 07/10] drm/qxl: Move ioctl array next to its only user

2021-12-17 Thread Thomas Zimmermann
Move the array qxl_ioctl to qxl_drv.c and initialize the num_ioctls field of struct drm_driver at runtime. Replaces the current fragile ioctl setup and allows for generating the module init/exit code. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_drv.c | 12 +-

[PATCH 02/10] drm/ast: Replace module-init boiler-plate code with DRM helpers

2021-12-17 Thread Thomas Zimmermann
Remove custom ast_init() and ast_exit() functions and initialize the module with DRM module helpers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ast/ast_drv.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_drv.c

[RFC][PATCH 00/10] drm: Add DRM module helpers for existing PCI drivers

2021-12-17 Thread Thomas Zimmermann
This is an RFC patchset to complement the helper macros provided in [1]. The module helpers create module init and exit helpers that respect the kernel parameters that enable/disable DRM drivers. There's one more patch that prepares qxl by moving some code around. It's required to make use of the

[PATCH 03/10] drm/bochs: Replace module-init boiler-plate code with DRM helpers

2021-12-17 Thread Thomas Zimmermann
Remove custom bochs_init() and bochs_exit() functions and initialize the module with DRM module helpers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tiny/bochs.c | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/tiny/bochs.c

[PATCH 01/10] drm: Provide PCI module-init macros

2021-12-17 Thread Thomas Zimmermann
Provide helper macros to register PCI-based DRM drivers. The new macros behave like module_pci_driver() with an additional test if DRM modesetting has been enabled. Signed-off-by: Thomas Zimmermann --- Documentation/gpu/drm-internals.rst | 6 ++ include/drm/drm_module.h| 95

[PATCH 05/10] drm/hisilicon/hibmc: Replace module initialization with DRM helpers

2021-12-17 Thread Thomas Zimmermann
Replace module_pci_driver() with drm_module_pci_driver(). The DRM macro respects drm_firmware_drivers_only() and fails if the flag has been set. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

Re: [PATCH v2] iova: Move fast alloc size roundup into alloc_iova_fast()

2021-12-17 Thread Joerg Roedel
On Tue, Dec 07, 2021 at 07:17:26PM +0800, John Garry wrote: > It really is a property of the IOVA rcache code that we need to alloc a > power-of-2 size, so relocate the functionality to resize into > alloc_iova_fast(), rather than the callsites. > > Signed-off-by: John Garry > Acked-by: Will

[iproute2-next v2 4/4] vdpa: Enable user to set mtu of the vdpa device

2021-12-17 Thread Parav Pandit via Virtualization
Implement mtu setting for vdpa device. $ vdpa mgmtdev show vdpasim_net: supported_classes net Add the device with mac address and mtu: $ vdpa dev add name bar mgmtdev vdpasim_net mac 00:11:22:33:44:55 mtu 9000 In above command only mac address or only mtu can also be set. View the config

[iproute2-next v2 3/4] vdpa: Enable user to set mac address of vdpa device

2021-12-17 Thread Parav Pandit via Virtualization
vdpa: Enable user to set mtu of the vdpa device Implement mtu setting for vdpa device. $ vdpa mgmtdev show vdpasim_net: supported_classes net Add the device with specified mac address: $ vdpa dev add name bar mgmtdev vdpasim_net mac 00:11:22:33:44:55 View the config after setting: $ vdpa dev

[iproute2-next v2 2/4] vdpa: Enable user to query vdpa device config layout

2021-12-17 Thread Parav Pandit via Virtualization
Query the device configuration layout whenever kernel supports it. An example of configuration layout of vdpa device of type network: $ vdpa dev add name bar mgmtdev vdpasim_net $ vdpa dev config show bar: mac 00:35:09:19:48:05 link up link_announce false mtu 1500 $ vdpa dev config show -jp {

[iproute2-next v2 0/4] vdpa tool to query and set config layout

2021-12-17 Thread Parav Pandit via Virtualization
This series implements querying and setting of the mac address and mtu device config fields of the vdpa device of type net. An example of query and set as below. $ vdpa dev add name bar mgmtdev vdpasim_net mac 00:11:22:33:44:55 mtu 9000 $ vdpa dev config show bar: mac 00:11:22:33:44:55 link up

[iproute2-next v2 1/4] vdpa: Update kernel headers

2021-12-17 Thread Parav Pandit via Virtualization
Update kernel headers to commit: ad69dd0bf26b ("vdpa: Introduce query of device config layout") Signed-off-by: Parav Pandit --- include/uapi/linux/virtio_net.h | 81 + vdpa/include/uapi/linux/vdpa.h | 7 +++ 2 files changed, 88 insertions(+) create mode 100644

Re: [PATCH] iommu/virtio: Fix typo in a comment

2021-12-17 Thread Joerg Roedel
On Thu, Dec 16, 2021 at 04:33:02PM +0800, Xiang wangx wrote: > The double `as' in a comment is repeated, thus it should be removed. > > Signed-off-by: Xiang wangx > --- > drivers/iommu/virtio-iommu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks.