> -Original Message-
> From: zhenwei pi [mailto:pizhen...@bytedance.com]
> Sent: Friday, January 21, 2022 10:25 AM
> To: m...@redhat.com; Gonglei (Arei)
> Cc: jasow...@redhat.com; virtualization@lists.linux-foundation.org;
> linux-cry...@vger.kernel.org; linux-ker...@vger.kernel.org;
>
On Thu, Feb 10, 2022 at 03:17:38PM +0800, Jason Wang wrote:
> On Thu, Feb 10, 2022 at 2:58 PM zhenwei pi wrote:
> >
> > PING!
>
> I think it would be helpful to get ack/reviewing from crypto gurus.
For sure, but with the robot warning some people might just assume
there's a problem and wait for
> -Original Message-
> From: zhenwei pi [mailto:pizhen...@bytedance.com]
> Sent: Friday, January 21, 2022 10:25 AM
> To: m...@redhat.com; Gonglei (Arei)
> Cc: jasow...@redhat.com; virtualization@lists.linux-foundation.org;
> linux-cry...@vger.kernel.org; linux-ker...@vger.kernel.org;
>
On Thu, Feb 10, 2022 at 2:58 PM zhenwei pi wrote:
>
> PING!
I think it would be helpful to get ack/reviewing from crypto gurus.
Maybe Herbert?
Thanks
>
> PS: Please ignore the warning from kernel test robot, I'll fix it in
> next version.
>
> On 1/21/22 10:24 AM, zhenwei pi wrote:
> >
PING!
PS: Please ignore the warning from kernel test robot, I'll fix it in
next version.
On 1/21/22 10:24 AM, zhenwei pi wrote:
Introduce akcipher service, implement RSA algorithm, and a minor fix.
zhenwei pi (3):
virtio_crypto: Introduce VIRTIO_CRYPTO_NOSPC
virtio-crypto: introduce
This adds a new flag, PF_USER_WORKER, that's used for behavior common to
to both PF_IO_WORKER and users like vhost which will use a new helper
instead of create_io_thread because they require different behavior.
The common behavior PF_USER_WORKER covers is the initial frame and fpu
setup and the
The next patch adds helpers like create_io_thread, but for use by the
vhost layer. There are several functions, so they are in their own file
instead of cluttering up fork.c. This patch allows that new file to
call copy_process.
Signed-off-by: Mike Christie
---
include/linux/sched/task.h | 2 ++
This is just a prep patch. It moves the worker related fields to a new
vhost_worker struct and moves the code around to create some helpers that
will be used in the next patch.
Signed-off-by: Mike Christie
Reviewed-by: Stefan Hajnoczi
Acked-by: Michael S. Tsirkin
Reviewed-by: Christoph Hellwig
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, so while tools like libvirt try to control the number of
threads based on the nproc rlimit setting we can end up creating more
threads
Each vhost device gets a thread that is used to perform IO and management
operations. Instead of a thread that is accessing a device, the thread is
part of the device, so when it creates a thread using a helper based on
copy_process we can't dup or clone the parent's files/FDS because it
would do
Qemu will create vhost devices in the kernel which perform network, SCSI,
etc IO and management operations from worker threads created by the
kthread API. Because the kthread API does a copy_process on the kthreadd
thread, the vhost layer has to use kthread_use_mm to access the Qemu
thread's
This patchset adds a couple new options to kernel_clone_args for the vhost
layer which is going to work like PF_IO_WORKER but will differ enough that
we will need to add several fields to kernel_clone_args. This patch moves
us to a flags based approach for these types of users.
Signed-off-by:
From: Christian Brauner
Since:
commit 10ab825bdef8 ("change kernel threads to ignore signals instead of
blocking them")
kthreads have been ignoring signals by default, and the vhost layer has
never had a need to change that. This patch adds an option flag,
USER_WORKER_SIG_IGN, handled in
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 cgroups, namespaces, address
space,
Initialize default vm_ops in static initialization of the GEM SHMEM funcs,
instead of the mmap code. It's simply better style. GEM helpers will later
set a VMA's vm_ops from the default automatically.
v2:
* also update the drivers that build upon GEM SHMEM
Signed-off-by: Thomas
Two patches for GEM's SHMEM-backed implementation.
v2:
* update drivers after vm_ops change
Thomas Zimmermann (2):
drm/gem-shmem: Set vm_ops in static initializer
drm/gem-shmem: Don't store mmap'ed buffers in core dumps
drivers/gpu/drm/drm_gem_shmem_helper.c | 7 ---
Set the VM_DONTDUMP flag on mmap'ed VMAs to omit them from core
dumps. It's display-buffer memory; who knows what secrets these
buffers contain.
Signed-off-by: Thomas Zimmermann
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
This patch implements virtio pci support for QUEUE RESET.
Performing reset on a queue is divided into these steps:
1. reset_vq: reset one vq
2. recycle the buffer from vq by virtqueue_detach_unused_buf()
3. release the ring of the vq by vring_release_virtqueue()
4. enable_reset_vq: re-enable the
Add queue_reset in virtio_pci_common_cfg, and add related operation
functions.
For not breaks uABI, add a new struct virtio_pci_common_cfg_reset.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_pci_modern_dev.c | 36 ++
include/linux/virtio_pci_modern.h | 2 ++
vp_setup_vq() adds parameter ring_num to allow specifying ring num
during setup.
This can be used to implement virtio-net support set_ringparm(ethtool
-G eth0 rx 128 tx 128)
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_pci_common.c | 8
drivers/virtio/virtio_pci_common.h | 5
In the process of queue reset, vq leaves vdev->vqs, so the original
processing logic may miss some vq. So modify the processing method of
releasing vq. Release vq by listing vqs.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_pci_common.c | 22 ++
modern setup_vq() replaces vring_create_virtqueue() with
vring_setup_virtqueue()
vp_setup_vq() can pass the original vq(from info->vq) to re-enable vq.
Allow direct calls to vp_setup_vq() in virtio_pci_modern.c
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_pci_common.c | 31
Performing reset on a queue is divided into four steps:
1. reset_vq: reset one vq
2. recycle the buffer from vq by virtqueue_detach_unused_buf()
3. release the ring of the vq by vring_release_virtqueue()
4. enable_reset_vq: re-enable the reset queue
So add two callbacks reset_vq, enable_reset_vq
Added vring_release_virtqueue() to release the ring of the vq.
In this process, vq is removed from the vdev->vqs queue. And the memory
of the ring is released
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 13 -
include/linux/virtio.h | 5 +
2 files changed,
The purpose of this patch is to make vring packed support re-enable reset
vq.
Based on whether the incoming vq passed by vring_setup_virtqueue() is
NULL or not, distinguish whether it is a normal create virtqueue or
re-enable a reset queue.
When re-enable a reset queue, reuse the original
The purpose of this patch is to make vring split support re-enable reset
vq.
Based on whether the incoming vq passed by vring_setup_virtqueue() is
NULL or not, distinguish whether it is a normal create virtqueue or
re-enable a reset queue.
When re-enable a reset queue, reuse the original
Extract a function __vring_del_virtqueue() from vring_del_virtqueue() to
handle releasing vq's ring.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c
Added VIRTIO_F_RING_RESET, it came from here
https://github.com/oasis-tcs/virtio-spec/issues/124
Signed-off-by: Xuan Zhuo
---
include/uapi/linux/virtio_config.h | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/virtio_config.h
The virtio spec already supports the virtio queue reset function. This patch set
is to add this function to the kernel. The relevant virtio spec information is
here:
https://github.com/oasis-tcs/virtio-spec/issues/124
Also regarding MMIO support for queue reset, I plan to support it after
Add queue_notify_data in struct virtio_pci_common_cfg, which comes from
here https://github.com/oasis-tcs/virtio-spec/issues/89
For not breaks uABI, add a new struct virtio_pci_common_cfg_notify.
Since I want to add queue_reset after queue_notify_data, I submitted
this patch first.
Extract vq's initialization function __vring_init_virtqueue() from
__vring_new_virtqueue()
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 61 +---
1 file changed, 42 insertions(+), 19 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c
Added function vring_setup_virtqueue() to allow passing existing vq
without reallocating vq.
The purpose of adding this function is to not break the form of
vring_create_virtqueue().
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 7 ---
include/linux/virtio_ring.h | 37
On Wed, Feb 09, 2022 at 09:21:20AM +0100, Christoph Hellwig wrote:
> Implement the ->free_disk method to free the virtio_blk structure only
> once the last gendisk reference goes away instead of keeping a local
> refcount.
>
> Signed-off-by: Christoph Hellwig
> ---
> drivers/block/virtio_blk.c
On Wed, Feb 09, 2022 at 09:21:20AM +0100, Christoph Hellwig wrote:
> Implement the ->free_disk method to free the virtio_blk structure only
> once the last gendisk reference goes away instead of keeping a local
> refcount.
>
> Signed-off-by: Christoph Hellwig
Acked-by: Michael S. Tsirkin
>
Implement the ->free_disk method to free the virtio_blk structure only
once the last gendisk reference goes away instead of keeping a local
refcount.
Signed-off-by: Christoph Hellwig
---
drivers/block/virtio_blk.c | 74 +++---
1 file changed, 21 insertions(+), 53
Implement the ->free_disk method to free the msb_data structure only once
the last gendisk reference goes away instead of keeping a local refcount.
Signed-off-by: Christoph Hellwig
---
drivers/memstick/core/ms_block.c | 64
drivers/memstick/core/ms_block.h | 1
Implement the ->free_disk method to free the msb_data structure only once
the last gendisk reference goes away instead of keeping a local
refcount.
Signed-off-by: Christoph Hellwig
---
drivers/memstick/core/mspro_block.c | 49 +
1 file changed, 7 insertions(+), 42
Use set_disk_ro to propagate the read-only state to the block layer
instead of checking for it in ->open and leaking a reference in case
of a read-only device.
Signed-off-by: Christoph Hellwig
---
drivers/memstick/core/mspro_block.c | 10 --
1 file changed, 4 insertions(+), 6
Hi Jens,
this series adds a ->free_disk method to struct block_device_operation so that
drivers can defer freeing their disk private data until the gendisk goes away
and don't need to play games with the validity of ->private_data.
This also converts three simple drivers over as example, but
Add a method to notify the driver that the gendisk is about to be freed.
This allows drivers to tie the lifetime of their private data to that of
the gendisk and thus deal with device removal races without expensive
synchronization and boilerplate code.
Signed-off-by: Christoph Hellwig
---
40 matches
Mail list logo