Re: [Patch net v3] vsock/virtio: fix variables initialization during resuming

2025-02-14 Thread Michael S. Tsirkin
eceding two variables after a suspend/resume. > > Fixes: bd50c5dc182b ("vsock/virtio: add support for device suspend/resume") > Link: > https://lore.kernel.org/virtualization/20250207052033.629-1-junnan01...@samsung.com/ > Co-developed-by: Ying Gao > Si

Re: [PATCH] virtio: Remove virtio devices on device_shutdown()

2025-02-14 Thread Michael S. Tsirkin
On Fri, Feb 14, 2025 at 08:56:56AM +0100, Eric Auger wrote: > Hi, > > On 2/14/25 8:21 AM, Ning, Hongyu wrote: > > > > > > On 2025/2/6 16:59, Eric Auger wrote: > >> Hi, > >> > >> On 2/4/25 12:46 PM, Eric Auger wrote: > >>> Hi,

Re: [PATCH] virtio: Remove virtio devices on device_shutdown()

2025-02-03 Thread Michael S. Tsirkin
On Fri, Jan 31, 2025 at 10:53:15AM +0100, Eric Auger wrote: > Hi Kirill, Michael > > On 8/8/24 9:51 AM, Kirill A. Shutemov wrote: > > Hongyu reported a hang on kexec in a VM. QEMU reported invalid memory > > accesses during the hang. > > > > Invalid read at

Re: [PATCH] virtio: Remove virtio devices on device_shutdown()

2025-01-31 Thread Michael S. Tsirkin
On Fri, Jan 31, 2025 at 10:53:15AM +0100, Eric Auger wrote: > Hi Kirill, Michael > > On 8/8/24 9:51 AM, Kirill A. Shutemov wrote: > > Hongyu reported a hang on kexec in a VM. QEMU reported invalid memory > > accesses during the hang. > > > > Invalid read at

[GIT PULL] virtio: features, fixes, cleanups

2025-01-27 Thread Michael S. Tsirkin
compliance virtio-mem now works with kdump on s390 Small cleanups all over the place. Signed-off-by: Michael S. Tsirkin Akihiko Odaki (1): vhost/net: Set num_buffers for virtio 1.0 David Hildenbrand (12): fs/proc/vmcore

Re: [PATCH v4 7/8] vhost: Add new UAPI to support change to task mode

2025-01-21 Thread Michael S. Tsirkin
On Wed, Jan 22, 2025 at 10:07:19AM +0800, Cindy Lu wrote: > Ping for review, Hi MST and Jason, do you have any comments on this? > Thanks > Cindy I see there are unaddressed comments by Jason and Stefano.

Re: [PATCH v4] vdpa: solidrun: Replace deprecated PCI functions

2025-01-20 Thread Michael S. Tsirkin
On Mon, Jan 20, 2025 at 10:13:03AM +0100, Philipp Stanner wrote: > On Thu, 2024-12-19 at 10:51 +0100, Stefano Garzarella wrote: > > On Thu, Dec 19, 2024 at 10:44:29AM +0100, Philipp Stanner wrote: > > > From: Philipp Stanner > > > > > > The PCI functions > > > > > > pcim_iomap_regions() > > >

Re: [PATCH] vhost/scsi: Fix improper cleanup in vhost_scsi_set_endpoint()

2025-01-14 Thread Michael S. Tsirkin
On Sun, Jan 12, 2025 at 03:19:44PM -0600, Mike Christie wrote: > On 1/12/25 11:35 AM, michael.chris...@oracle.com wrote: > > So I think to fix the issue, we would want to: > > > > 1. move the > > > > memcpy(vs_tpg, vs->vs_tpg, len); > > > > to the end of the function after we do the vhost_scsi_f

Re: [PATCH] vhost/scsi: Fix improper cleanup in vhost_scsi_set_endpoint()

2025-01-12 Thread michael . christie
On 1/10/25 9:34 PM, Haoran Zhang wrote: > Since commit 3f8ca2e115e55 ("vhost scsi: alloc cmds per vq instead of > session"), a bug can be triggered when the host sends a duplicate > VHOST_SCSI_SET_ENDPOINT ioctl command. I don't think that git commit is correct. It should be: 25b98b64e284 ("vho

Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

2025-01-10 Thread Michael S. Tsirkin
On Fri, Jan 10, 2025 at 11:32:46AM +0800, Jason Wang wrote: > On Wed, Jan 8, 2025 at 7:35 PM Michael S. Tsirkin wrote: > > > > On Mon, Nov 11, 2024 at 10:55:38AM +0800, Jason Wang wrote: > > > There's no need to sync DMA for CPU on mapping errors. So this patch &g

Re: [PATCH net 1/2] vsock/virtio: discard packets if the transport changes

2025-01-09 Thread Michael S. Tsirkin
On Thu, Jan 09, 2025 at 10:01:31AM +0100, Stefano Garzarella wrote: > On Wed, Jan 08, 2025 at 02:31:19PM -0500, Hyunwoo Kim wrote: > > On Wed, Jan 08, 2025 at 07:06:16PM +0100, Stefano Garzarella wrote: > > > If the socket has been de-assigned or assigned to another transport, > > > we must discard

Re: [PATCH net 2/2] vsock/bpf: return early if transport is not assigned

2025-01-09 Thread Michael S. Tsirkin
110b4 ("vsock: support sockmap") > Reported-by: Michal Luczaj > Closes: > https://lore.kernel.org/netdev/5ca20d4c-1017-49c2-9516-f6f75fd33...@rbox.co/ > Signed-off-by: Stefano Garzarella Acked-by: Michael S. Tsirkin > --- > net/vmw_vsock/vsock_bpf.c | 9 + >

Re: [PATCH v5 0/6] vhost: Add support of kthread API

2025-01-08 Thread Michael S. Tsirkin
On Mon, Dec 30, 2024 at 08:43:47PM +0800, Cindy Lu wrote: > In commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"), > the vhost now uses vhost_task and operates as a child of the > owner thread. This aligns with containerization principles. > However, this change has caused c

Re: [PATCH v5 5/6] vhost: Add new UAPI to support change to task mode

2025-01-08 Thread Michael S. Tsirkin
On Thu, Jan 02, 2025 at 11:36:58AM +0800, Jason Wang wrote: > On Mon, Dec 30, 2024 at 8:45 PM Cindy Lu wrote: > > > > Add a new UAPI to enable setting the vhost device to task mode. > > The userspace application can use VHOST_SET_INHERIT_FROM_OWNER > > to configure the mode if necessary. > > This

Re: [PATCH v5 5/6] vhost: Add new UAPI to support change to task mode

2025-01-08 Thread Michael S. Tsirkin
On Mon, Dec 30, 2024 at 08:43:52PM +0800, Cindy Lu wrote: > Add a new UAPI to enable setting the vhost device to task mode. > The userspace application can use VHOST_SET_INHERIT_FROM_OWNER > to configure the mode if necessary. > This setting must be applied before VHOST_SET_OWNER, as the worker > w

Re: [PATCH v4 7/8] vhost: Add new UAPI to support change to task mode

2025-01-08 Thread Michael S. Tsirkin
On Wed, Dec 11, 2024 at 12:41:46AM +0800, Cindy Lu wrote: > Add a new UAPI to enable setting the vhost device to task mode. > The userspace application can use VHOST_SET_INHERIT_FROM_OWNER > to configure the mode if necessary. > This setting must be applied before VHOST_SET_OWNER, as the worker > w

Re: [PATCH v2] vdpa/vp_vdpa: implement kick_vq_with_data callback

2025-01-08 Thread Michael S. Tsirkin
On Tue, Dec 03, 2024 at 10:37:43AM +0800, Yuxue Liu yuxue@jaguarmicro.com wrote: > From: Yuxue Liu > > Implement the kick_vq_with_data vDPA callback. > On kick, we pass the next available data to the hardware by writing it in > the kick offset. > > Signed-off-by: Yuxue Liu Pls do not send

Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

2025-01-08 Thread Michael S. Tsirkin
On Mon, Nov 11, 2024 at 10:55:38AM +0800, Jason Wang wrote: > There's no need to sync DMA for CPU on mapping errors. So this patch > skips the CPU sync in the error handling path of DMA mapping. > > Signed-off-by: Jason Wang So as I said, I do not get why we are optimizing error paths. The comm

Re: [PATCH] vhost/net: Set num_buffers for virtio 1.0

2024-12-27 Thread Michael S. Tsirkin
On Fri, Dec 27, 2024 at 01:34:10PM +0900, Akihiko Odaki wrote: > On 2024/12/27 10:29, Jason Wang wrote: > > > > > > On Thu, Dec 26, 2024 at 7:54 PM Michael S. Tsirkin > <mailto:m...@redhat.com>> wrote: > > > > On Mon, Nov 11, 2024 at 09:27:45

Re: [PATCH] vhost/net: Set num_buffers for virtio 1.0

2024-12-26 Thread Michael S. Tsirkin
On Mon, Nov 11, 2024 at 09:27:45AM +0800, Jason Wang wrote: > On Wed, Nov 6, 2024 at 4:54 PM Michael S. Tsirkin wrote: > > > > On Sun, Sep 15, 2024 at 10:35:53AM +0900, Akihiko Odaki wrote: > > > The specification says the device MUST set num_buffers to 1 if > > &g

Re: [PATCH v2] virtio: fix reference leak in register_virtio_device()

2024-12-18 Thread Michael S. Tsirkin
On Wed, Dec 18, 2024 at 11:12:01AM +0800, Ma Ke wrote: > Once device_add(&dev->dev) failed, call put_device() to explicitly > release dev->dev. Or it could cause double free problem. > > As comment of device_add() says, 'if device_add() succeeds, you should > call device_del() when you want to get

Re: [PATCH v3 4/4] vdpa/octeon_ep: read vendor-specific PCI capability

2024-12-13 Thread Michael S. Tsirkin
On Fri, Dec 13, 2024 at 02:20:24PM +, Shijith Thotton wrote: > >>> > >>> Added support to read the vendor-specific PCI capability to identify the > >>> type of device being emulated. > >>> > >>> Reviewed-by: Dan Carpenter > >>> Signed-off-by: Shijith Thotton > >>> --- > >>> drivers/vdpa/octe

Re: [PATCH net v4 0/6] virtio_net: correct netdev_tx_reset_queue() invocation points

2024-12-11 Thread Michael S. Tsirkin
all > netdev_tx_reset_queue() when virtqueue_reset() has actually recycled > unused buffers. thanks Acked-by: Michael S. Tsirkin > This patch series consists of six commits: > [1/6]: Resolves (a) and (b). # also -stable 6.11.y > [2/6]: Minor

Re: [PATCH net-next v3 1/7] virtio_net: correct netdev_tx_reset_queue() invocation point

2024-12-05 Thread Michael S. Tsirkin
On Thu, Dec 05, 2024 at 10:16:35PM +0900, Koichiro Den wrote: > On Thu, Dec 05, 2024 at 09:43:38PM +0900, Koichiro Den wrote: > > On Thu, Dec 05, 2024 at 05:33:36AM -0500, Michael S. Tsirkin wrote: > > > On Wed, Dec 04, 2024 at 02:07:18PM +0900, Koichiro Den wrote: > > &

Re: [PATCH net-next v3 1/7] virtio_net: correct netdev_tx_reset_queue() invocation point

2024-12-05 Thread Michael S. Tsirkin
On Thu, Dec 05, 2024 at 10:16:35PM +0900, Koichiro Den wrote: > On Thu, Dec 05, 2024 at 09:43:38PM +0900, Koichiro Den wrote: > > On Thu, Dec 05, 2024 at 05:33:36AM -0500, Michael S. Tsirkin wrote: > > > On Wed, Dec 04, 2024 at 02:07:18PM +0900, Koichiro Den wrote: > > &

Re: [PATCH net-next v3 0/7] virtio_net: correct netdev_tx_reset_queue() invocation points

2024-12-05 Thread Michael S. Tsirkin
On Wed, Dec 04, 2024 at 02:07:17PM +0900, Koichiro Den wrote: > When virtnet_close is followed by virtnet_open, some TX completions can > possibly remain unconsumed, until they are finally processed during the > first NAPI poll after the netdev_tx_reset_queue(), resulting in a crash > [1]. Commit b

Re: [PATCH net-next v3 3/7] virtio_net: introduce virtnet_sq_free_unused_buf_done()

2024-12-05 Thread Michael S. Tsirkin
On Wed, Dec 04, 2024 at 02:07:20PM +0900, Koichiro Den wrote: > This will be used in the following commits, to ensure DQL reset occurs > iff. all unused buffers are actually recycled. > > Cc: # v6.11+ > Signed-off-by: Koichiro Den to avoid adding an unused function, squash with a patch that use

Re: [PATCH net-next v3 2/7] virtio_net: replace vq2rxq with vq2txq where appropriate

2024-12-05 Thread Michael S. Tsirkin
ffer") > Signed-off-by: Koichiro Den Acked-by: Michael S. Tsirkin > --- > drivers/net/virtio_net.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 48ce8b3881b6..1b7a85e75e14 100644 >

Re: [PATCH net-next v3 1/7] virtio_net: correct netdev_tx_reset_queue() invocation point

2024-12-05 Thread Michael S. Tsirkin
On Wed, Dec 04, 2024 at 02:07:18PM +0900, Koichiro Den wrote: > When virtnet_close is followed by virtnet_open, some TX completions can > possibly remain unconsumed, until they are finally processed during the > first NAPI poll after the netdev_tx_reset_queue(), resulting in a crash > [1]. So it'

Re: drivers/virtio/virtio_ring.c:1162:11: error: 'struct vring_virtqueue' has no member named 'premapped'

2024-11-27 Thread Michael S. Tsirkin
On Wed, Nov 27, 2024 at 01:30:59PM +0530, Naresh Kamboju wrote: > The following build errors were noticed for arm64, arm, x86_64 and riscv. > > First seen on Sasha Linus-next 441d2975754ad94f3ce2e29f672824bc2dc5120c. > Good: 07e98e730a08081b6d0b5c3a173b0487c36ed27f > Bad: 441d2975754ad94f3ce2

Re: [GIT PULL] virtio: features, fixes, cleanups

2024-11-27 Thread Michael S. Tsirkin
On Tue, Nov 26, 2024 at 04:31:51PM -0500, Michael S. Tsirkin wrote: > > I was hoping to get vhost threading compat fixes in but no luck. > A very quiet merge cycle - I guess it's a sign we got a lot merged > last time, and everyone is busy testing. Right, guys? You will get a me

[GIT PULL] virtio: features, fixes, cleanups

2024-11-26 Thread Michael S. Tsirkin
12 18:07:46 -0500) virtio: features, fixes, cleanups A small number of improvements all over the place. Signed-off-by: Michael S. Tsirkin Colin Ian Ki

Re: [PATCH v3 4/9] vhost: Add kthread support in function vhost_worker_create

2024-11-26 Thread michael . christie
On 11/5/24 1:25 AM, Cindy Lu wrote: > static struct vhost_worker *vhost_worker_create(struct vhost_dev *dev) > { > struct vhost_worker *worker; > - struct vhost_task *vtsk; > + struct vhost_task *vtsk = NULL; > + struct task_struct *task = NULL; > char name[TASK_COMM_LEN];

Re: [PATCH v2] selftests/powerpc: Remove the path after initialization.

2024-11-17 Thread Michael Ellerman
On Mon, 30 Sep 2024 09:27:57 +0800, zhangjiao2 wrote: > If there were no anamolies noted, then we can > simply remove the log file and return. > > Applied to powerpc/next. [1/1] selftests/powerpc: Remove the path after initialization. https://git.kernel.org/powerpc/c/7ca93aa9204b706e4afcd

[PATCH] selftests/mount_setattr: Fix failures on 64K PAGE_SIZE kernels

2024-11-15 Thread Michael Ellerman
a size of 2MB. With that all 21 tests pass on 64K PAGE_SIZE kernels. Fixes: 01eadc8dd96d ("tests: add mount_setattr() selftests") Signed-off-by: Michael Ellerman --- tools/testing/selftests/mount_setattr/mount_setattr_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

Re: [PATCH vhost 2/2] vdpa/mlx5: Fix suboptimal range on iotlb iteration

2024-11-13 Thread Michael S. Tsirkin
On Wed, Nov 13, 2024 at 04:01:05PM +0100, Dragos Tatulea wrote: > > > On 13.11.24 15:49, Michael S. Tsirkin wrote: > > On Wed, Nov 13, 2024 at 03:33:35PM +0100, Dragos Tatulea wrote: > >> > >> > >> On 13.11.24 07:32, Michael S. Tsirkin wrote: >

Re: [PATCH vhost 2/2] vdpa/mlx5: Fix suboptimal range on iotlb iteration

2024-11-13 Thread Michael S. Tsirkin
On Wed, Nov 13, 2024 at 03:33:35PM +0100, Dragos Tatulea wrote: > > > On 13.11.24 07:32, Michael S. Tsirkin wrote: > > On Mon, Oct 21, 2024 at 04:40:40PM +0300, Dragos Tatulea wrote: > >> From: Si-Wei Liu > >> > >> The starting iova address to iterate i

Re: [PATCH vhost 0/2] vdpa/mlx5: Iova mapping related fixes

2024-11-12 Thread Michael S. Tsirkin
On Wed, Nov 13, 2024 at 09:45:22AM +0800, Jason Wang wrote: > On Mon, Nov 11, 2024 at 4:58 PM Dragos Tatulea wrote: > > > > > > > > On 21.10.24 15:40, Dragos Tatulea wrote: > > > Here are 2 fixes from Si-Wei: > > > - The first one is an important fix that has to be applied as far > > > back as p

Re: [PATCH vhost 2/2] vdpa/mlx5: Fix suboptimal range on iotlb iteration

2024-11-12 Thread Michael S. Tsirkin
On Mon, Oct 21, 2024 at 04:40:40PM +0300, Dragos Tatulea wrote: > From: Si-Wei Liu > > The starting iova address to iterate iotlb map entry within a range > was set to an irrelevant value when passing to the itree_next() > iterator, although luckily it doesn't affect the outcome of finding > out

Re: [PATCH] vdpa: vdpa_sim: vdpa_sim_net: fixed cofing style issues

2024-11-12 Thread Michael S. Tsirkin
On Thu, Nov 07, 2024 at 09:19:41PM +0200, Gediminas Repecka wrote: > Fixed coding style issues reported by checkpatch script > --- A lot is wrong with this submission, given it's supposed to fix checkpatch: - no signature - typo in subject - not using direct voice (Fix, not Fixed) pls fix and

[GIT PULL] virtio: bugfix

2024-11-12 Thread Michael S. Tsirkin
up to 29ce8b8a4fa74e841342c8b8f8941848a3c6f29f: vdpa/mlx5: Fix PA offset with unaligned starting iotlb map (2024-11-12 18:05:04 -0500) virtio: bugfix A last minute mlx5 bugfix Signed-off-by: Michael S. Tsirkin

Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

2024-11-12 Thread Michael S. Tsirkin
On Mon, Nov 11, 2024 at 04:36:52PM +0800, Jason Wang wrote: > On Mon, Nov 11, 2024 at 3:30 PM Michael S. Tsirkin wrote: > > > > On Mon, Nov 11, 2024 at 10:55:38AM +0800, Jason Wang wrote: > > > There's no need to sync DMA for CPU on mapping errors. So this patch &g

[GIT PULL] virtio: bugfixes

2024-11-11 Thread Michael S. Tsirkin
83e445e64f48bdae3f25013e788fcf592f142576: vdpa/mlx5: Fix error path during device add (2024-11-07 16:51:16 -0500) virtio: bugfixes Several small bugfixes all over the place. Signed-off-by: Michael S. Tsirkin

Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

2024-11-10 Thread Michael S. Tsirkin
On Mon, Nov 11, 2024 at 10:55:38AM +0800, Jason Wang wrote: > There's no need to sync DMA for CPU on mapping errors. So this patch > skips the CPU sync in the error handling path of DMA mapping. > > Signed-off-by: Jason Wang DMA sync is idempotent. Extra work for slow path. Why do we bother? >

Re: [PATCH v3 1/2] vdpa/mlx5: Set speed and duplex of vDPA devices to UNKNOWN

2024-11-08 Thread Michael S. Tsirkin
On Fri, Nov 08, 2024 at 10:31:58AM +0100, Dragos Tatulea wrote: > > > On 07.11.24 22:50, Michael S. Tsirkin wrote: > > On Wed, Sep 04, 2024 at 10:11:14AM -0500, Carlos Bilbao wrote: > >> From: Carlos Bilbao > >> > >> Initialize the speed and dup

Re: [PATCH v3 1/2] vdpa/mlx5: Set speed and duplex of vDPA devices to UNKNOWN

2024-11-07 Thread Michael S. Tsirkin
On Wed, Sep 04, 2024 at 10:11:14AM -0500, Carlos Bilbao wrote: > From: Carlos Bilbao > > Initialize the speed and duplex fields in virtio_net_config to UNKNOWN. > This is needed because mlx5_vdpa vDPA devices currently do not support the > VIRTIO_NET_F_SPEED_DUPLEX feature which reports speed and

Re: [PATCH] virtio-pci: Add MSI support

2024-11-06 Thread Michael S. Tsirkin
On Fri, Jul 12, 2024 at 07:59:14PM +0530, Manivannan Sadhasivam wrote: > Virtio spec has so far only supported MSI-X and INTX for receiving the > interrupts from the virtio device on PCI transport. But this becomes a > limiting factor for devices supporting only MSI (plus INTX emulation) as > they

Re: [PATCH net 0/4] virtio_net: Make RSS interact properly with queue number

2024-11-06 Thread Michael S. Tsirkin
hen queue_pairs changes _with_ user rss configuration, keep rss as user > configured > > Patch 1 and 2 fix possible out of bound errors for indir_table and key. > Patch 3 and 4 add RSS update in probe() and set_queues(). > > Please review, thanks. Looks reasonable. Acked-by: M

Re: [PATCH v2] vhost/vsock: specify module version

2024-11-06 Thread Michael S. Tsirkin
On Wed, Oct 02, 2024 at 07:16:02AM -0700, Jakub Kicinski wrote: > On Mon, 30 Sep 2024 19:03:52 +0200 Aleksandr Mikhalitsyn wrote: > > > At this point my question is, should we solve the problem higher and > > > show all the modules in /sys/modules, either way? > > > > Probably, yes. We can ask L

Re: [PATCH] vhost/net: Set num_buffers for virtio 1.0

2024-11-06 Thread Michael S. Tsirkin
On Sun, Sep 15, 2024 at 10:35:53AM +0900, Akihiko Odaki wrote: > The specification says the device MUST set num_buffers to 1 if > VIRTIO_NET_F_MRG_RXBUF has not been negotiated. > > Fixes: 41e3e42108bc ("vhost/net: enable virtio 1.0") > Signed-off-by: Akihiko Odaki True, this is out of spec. But

Re: [PATCH v3 7/9] vhost: Add new UAPI to support change to task mode

2024-11-05 Thread Michael S. Tsirkin
On Tue, Nov 05, 2024 at 03:25:26PM +0800, Cindy Lu wrote: > Add a new UAPI to enable setting the vhost device to task mode. > The userspace application can use VHOST_SET_INHERIT_FROM_OWNER > to configure the mode if necessary. > This setting must be applied before VHOST_SET_OWNER, as the worker > w

Re: [PATCH v3 7/9] vhost: Add new UAPI to support change to task mode

2024-11-05 Thread Michael S. Tsirkin
On Tue, Nov 05, 2024 at 03:25:26PM +0800, Cindy Lu wrote: > index b95dd84eef2d..1e192038633d 100644 > --- a/include/uapi/linux/vhost.h > +++ b/include/uapi/linux/vhost.h > @@ -235,4 +235,6 @@ > */ > #define VHOST_VDPA_GET_VRING_SIZE_IOWR(VHOST_VIRTIO, 0x82, \ >

Re: [PATCH v8 1/3] modules: Support extended MODVERSIONS info

2024-10-30 Thread Michael Ellerman
ew format. Other architectures do not appear to > have architecture-specific usage of this information. > > Reviewed-by: Sami Tolvanen > Signed-off-by: Matthew Maurer > --- > arch/powerpc/kernel/module_64.c | 24 ++- Acked-by: Michael Ellerman (powerpc) cheers

Re: [PATCH v7 1/3] modules: Support extended MODVERSIONS info

2024-10-29 Thread Michael Ellerman
Matthew Maurer writes: >> Sorry I realise it's version 7, but although the above looks correct it's >> kind of dense. >> >> I think the below would also work and is (I think) easier to follow, and >> is more obviously similar to the existing code. I'm sure your version is >> faster, but I don't th

Re: [PATCH v7 1/3] modules: Support extended MODVERSIONS info

2024-10-25 Thread Michael Ellerman
Matthew Maurer writes: > Adds a new format for MODVERSIONS which stores each field in a separate > ELF section. This initially adds support for variable length names, but > could later be used to add additional fields to MODVERSIONS in a > backwards compatible way if needed. Any new fields will be

[PATCH v5 3/3] selftests: livepatch: test livepatching a kprobed function

2024-10-17 Thread Michael Vetter
Documentation/trace/kprobetrace.rst. This interface uses only the pre_handler(), see alloc_trace_kprobe(). But FTRACE_OPS_FL_IPMODIFY is used only when the kprobe is using a post_handler, see arm_kprobe_ftrace(). Signed-off-by: Michael Vetter --- tools/testing/selftests/livepatch/Makefile| 3

[PATCH v5 1/3] selftests: livepatch: rename KLP_SYSFS_DIR to SYSFS_KLP_DIR

2024-10-17 Thread Michael Vetter
This naming makes more sense according to the directory structure. Especially when we later add more paths. Addtionally replace `/sys/kernel/livepatch` with `$SYSFS_KLP_DIR` in the livepatch test files. Signed-off-by: Michael Vetter --- .../testing/selftests/livepatch/functions.sh | 16

[PATCH v5 2/3] selftests: livepatch: save and restore kprobe state

2024-10-17 Thread Michael Vetter
Save the state of /sys/kernel/debug/kprobes/enabled during setup_config() and restore it during cleanup(). This is in preparation for a future commit that will add a test that should confirm that we cannot livepatch a kprobed function if that kprobe has a post handler. Signed-off-by: Michael

[PATCH v5 0/3] selftests: livepatch: test livepatching a kprobed function

2024-10-17 Thread Michael Vetter
: Save and restore kprobe state also when test fails, by integrating it into setup_config() and cleanup(). Rename SYSFS variables in a more logical way. Sort test modules in alphabetical order. Rename module description. V2: Save and restore kprobe state. Michael Vetter (3): selftests: livepat

[PATCH] virtio_net: fix integer overflow in stats

2024-10-16 Thread Michael S. Tsirkin
is read into a u64: u64 offset, bitmap; bitmap = ctx->bitmap[queue_type]; so to fix, it is enough to make bitmap an array of u64. Fixes: 941168f8b40e5 ("virtio_net: support device stats") Reported-by: "Colin King (gmail)" Signed-off-by: Michael S. Tsirkin --- drive

Re: [PATCH v2 7/7] vhost: Add new UAPI to support change to task mode

2024-10-15 Thread Michael S. Tsirkin
On Mon, Oct 14, 2024 at 03:56:33PM -0500, Mike Christie wrote: > On 10/3/24 8:58 PM, Cindy Lu wrote: > > Add a new UAPI to support setting the vhost device to > > use task mode. The user space application needs to use > > VHOST_SET_INHERIT_FROM_OWNER to set the mode. > > This setting must be set be

[GIT PULL] virtio: bugfixes

2024-10-07 Thread Michael S. Tsirkin
notably, fixes the vsock allocation with GFP_KERNEL in atomic context, which has been triggering warnings for lots of testers. Signed-off-by: Michael S. Tsirkin Haoran Zhang (1): vhost/scsi: null-ptr-dereference in

Re: [PATCH] vsock/virtio: use GFP_ATOMIC under RCU read lock

2024-10-07 Thread Michael S. Tsirkin
On Mon, Oct 07, 2024 at 08:39:20AM -0700, Jakub Kicinski wrote: > On Wed, 2 Oct 2024 09:41:42 -0400 Michael S. Tsirkin wrote: > > virtio_transport_send_pkt in now called on transport fast path, > > under RCU read lock. In that case, we have a bug: virtio_add_sgs > > is called

[PATCH] vsock/virtio: use GFP_ATOMIC under RCU read lock

2024-10-02 Thread Michael S. Tsirkin
/hfcr2aget2zojmqpr4uhlzvnep4vgskblx5b6xf2ddosbsrke7@nt34bxgp7j2x Fixes: efcd71af38be ("vsock/virtio: avoid queuing packets when intermediate queue is empty") Reported-by: Christian Brauner Cc: Stefano Garzarella Cc: Luigi Leonardi Signed-off-by: Michael S. Tsirkin --- Lightly tested. Christian, cou

Re: Re: [PATCH] virtio: Make vring_new_virtqueue support for packed vring

2024-10-01 Thread Michael S. Tsirkin
On Tue, Oct 01, 2024 at 05:30:51PM +0800, Wenyu Huang wrote: > It used for testing in tools/virtio/vringh_test.c. > If vring_new_virtqueue supports packed vring, we can add support for > packed vring to vringh and test it. Pls say this in the commit log.

Re: [PATCH v2] vhost/vsock: specify module version

2024-09-30 Thread Michael S. Tsirkin
On Mon, Sep 30, 2024 at 02:28:30PM +0200, Aleksandr Mikhalitsyn wrote: > On Sun, Sep 29, 2024 at 9:03 PM Michael S. Tsirkin wrote: > > > > On Sun, Sep 29, 2024 at 08:21:03PM +0200, Alexander Mikhalitsyn wrote: > > > Add an explicit MODULE_VERSION("0.0.1")

[PATCH v4 3/3] selftests: livepatch: test livepatching a kprobed function

2024-09-30 Thread Michael Vetter
The test proves that a function that is being kprobed and uses a post_handler cannot be livepatched. Only one ftrace_ops with FTRACE_OPS_FL_IPMODIFY set may be registered to any given function at a time. Signed-off-by: Michael Vetter --- tools/testing/selftests/livepatch/Makefile| 3

[PATCH v4 2/3] selftests: livepatch: save and restore kprobe state

2024-09-30 Thread Michael Vetter
Save the state of /sys/kernel/debug/kprobes/enabled during setup_config() and restore it during cleanup(). This is in preparation for a future commit that will add a test that should confirm that we cannot livepatch a kprobed function if that kprobe has a post handler. Signed-off-by: Michael

[PATCH v4 1/3] selftests: livepatch: rename KLP_SYSFS_DIR to SYSFS_KLP_DIR

2024-09-30 Thread Michael Vetter
This naming makes more sense according to the directory structure. Especially when we later add more paths. Signed-off-by: Michael Vetter --- tools/testing/selftests/livepatch/functions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests

[PATCH v4 0/3] selftests: livepatch: test livepatching a kprobed function

2024-09-30 Thread Michael Vetter
nfig() and cleanup(). Rename SYSFS variables in a more logical way. Sort test modules in alphabetical order. Rename module description. V2: Save and restore kprobe state. Michael Vetter (3): selftests: livepatch: rename KLP_SYSFS_DIR to SYSFS_KLP_DIR selftests: livepatch: save and restore kp

Re: [PATCH v2] vhost/vsock: specify module version

2024-09-29 Thread Michael S. Tsirkin
On Sun, Sep 29, 2024 at 08:21:03PM +0200, Alexander Mikhalitsyn wrote: > Add an explicit MODULE_VERSION("0.0.1") specification for the vhost_vsock > module. > > It is useful because it allows userspace to check if vhost_vsock is there > when it is > configured as a built-in. > > This is what we

Re: [PATCH] vhost/vsock: specify module version

2024-09-29 Thread Michael S. Tsirkin
On Sun, Sep 29, 2024 at 07:35:35PM +0200, Aleksandr Mikhalitsyn wrote: > On Sun, Sep 29, 2024 at 6:56 PM Michael S. Tsirkin wrote: > > > > On Thu, Sep 26, 2024 at 06:16:40PM +0200, Alexander Mikhalitsyn wrote: > > > Add an explicit MODULE_VERSION("0.0.1") spe

Re: [PATCH] vhost/vsock: specify module version

2024-09-29 Thread Michael S. Tsirkin
On Sun, Sep 29, 2024 at 07:35:35PM +0200, Aleksandr Mikhalitsyn wrote: > On Sun, Sep 29, 2024 at 6:56 PM Michael S. Tsirkin wrote: > > > > On Thu, Sep 26, 2024 at 06:16:40PM +0200, Alexander Mikhalitsyn wrote: > > > Add an explicit MODULE_VERSION("0.0.1") spe

Re: [PATCH] vhost/vsock: specify module version

2024-09-29 Thread Michael S. Tsirkin
On Thu, Sep 26, 2024 at 06:16:40PM +0200, Alexander Mikhalitsyn wrote: > Add an explicit MODULE_VERSION("0.0.1") specification > for a vhost_vsock module. It is useful because it allows > userspace to check if vhost_vsock is there when it is > configured as a built-in. > > Without this change, the

Re: [GIT PULL] virtio: features, fixes, cleanups

2024-09-25 Thread Michael S. Tsirkin
On Wed, Sep 25, 2024 at 09:38:49AM +0200, Stefano Garzarella wrote: > On Tue, Sep 24, 2024 at 04:50:46PM GMT, Michael S. Tsirkin wrote: > > The following changes since commit 431c1646e1f86b949fa3685efc50b660a364c2b6: > > > > Linux 6.11-rc6 (2024-09-01 19:46:02 +1200) >

[GIT PULL v2] virtio: features, fixes, cleanups

2024-09-25 Thread Michael S. Tsirkin
virtio/vsock performance has been improved Fixes, cleanups all over the place. Signed-off-by: Michael S. Tsirkin Cindy Lu (3): vdpa: support set mac address from vdpa tool vdpa_sim_net: Add the support of set mac address

Re: [GIT PULL] virtio: features, fixes, cleanups

2024-09-25 Thread Michael S. Tsirkin
On Tue, Sep 24, 2024 at 04:50:46PM -0400, Michael S. Tsirkin wrote: > The following changes since commit 431c1646e1f86b949fa3685efc50b660a364c2b6: > > Linux 6.11-rc6 (2024-09-01 19:46:02 +1200) > > are available in the Git repository at: > > https://git.kernel.org/pub

Re: [PATCH] virtio: Make vring_new_virtqueue support for packed vring

2024-09-24 Thread Michael S. Tsirkin
On Sat, Sep 21, 2024 at 04:21:41AM +0800, Wenyu Huang wrote: > From: Wenyu Huang > > It's also available for packed ring now. > > Signed-off-by: Wenyu Huang More specifically, what are you trying to address here? Which configuration did not work but does now? > --- > drivers/virtio/virtio_r

[GIT PULL] virtio: features, fixes, cleanups

2024-09-24 Thread Michael S. Tsirkin
vdpa supports setting mac address vdpa/mlx5 suspend/resume as well as MKEY ops are now faster virtio_fs supports new sysfs entries for queue info virtio/vsock performance has been improved Fixes, cleanups all over the place. Signed-off-by: Michael S. Tsirkin

[PATCH v3 2/3] selftests: livepatch: save and restore kprobe state

2024-09-20 Thread Michael Vetter
: Michael Vetter --- tools/testing/selftests/livepatch/functions.sh | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh index 50361fceff06..6684c01c0567 100644 --- a/tools/testing

[PATCH v3 0/3] selftests: livepatch: test livepatching a kprobed function

2024-09-20 Thread Michael Vetter
order. Rename module description. V2: Save and restore kprobe state. Michael Vetter (3): selftests: livepatch: rename KLP_SYSFS_DIR to SYSFS_KLP_DIR selftests: livepatch: save and restore kprobe state selftests: livepatch: test livepatching a kprobed function tools/testing/selftests

[PATCH v3 3/3] selftests: livepatch: test livepatching a kprobed function

2024-09-20 Thread Michael Vetter
The test proves that a function that is being kprobed and uses a post_handler cannot be livepatched. Only one ftrace_ops with FTRACE_OPS_FL_IPMODIFY set may be registered to any given function at a time. Signed-off-by: Michael Vetter --- tools/testing/selftests/livepatch/Makefile| 3

[PATCH v3 1/3] selftests: livepatch: rename KLP_SYSFS_DIR to SYSFS_KLP_DIR

2024-09-20 Thread Michael Vetter
This naming makes more sense according to the directory structure. Especially when we later add more paths. Signed-off-by: Michael Vetter --- tools/testing/selftests/livepatch/functions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests

Re: [PATCH v3] virtio_net: Fix mismatched buf address when unmapping for small packets

2024-09-18 Thread Michael S. Tsirkin
On Wed, Sep 18, 2024 at 09:20:05PM +0800, Wenbo Li wrote: > Currently, the virtio-net driver will perform a pre-dma-mapping for > small or mergeable RX buffer. But for small packets, a mismatched address > without VIRTNET_RX_PAD and xdp_headroom is used for unmapping. > > That will result in unsyn

[PATCH] virtio_console: fix misc probe bugs

2024-09-16 Thread Michael S. Tsirkin
find_port_by_vq which attempts to take ports_lock which also has not been initialized. To fix, init all locks and work before creating vqs. Fixes: 17634ba25544 ("virtio: console: Add a new MULTIPORT feature, support for generic ports") Signed-off-by: Michael S. Tsirkin --- dr

[PATCH v2] virtio_ring: tag event_triggered as racy for KCSAN

2024-09-12 Thread Michael S. Tsirkin
should probably look at ways to make this more straight-forwardly correct. Cc: Marco Elver Reported-by: syzbot+8a02104389c2e0ef5...@syzkaller.appspotmail.com Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

Re: [syzbot] [virt?] KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (4)

2024-09-12 Thread Michael S. Tsirkin
On Thu, Sep 12, 2024 at 04:46:28PM +0200, Marco Elver wrote: > On Thu, 12 Sept 2024 at 16:34, Michael S. Tsirkin wrote: > > > > On Thu, Sep 12, 2024 at 03:48:32PM +0200, Marco Elver wrote: > > > On Thu, 12 Sept 2024 at 13:03, Michael S. Tsirkin wrote: > > > >

Re: [syzbot] [virt?] KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (4)

2024-09-12 Thread Michael S. Tsirkin
On Thu, Sep 12, 2024 at 03:48:32PM +0200, Marco Elver wrote: > On Thu, 12 Sept 2024 at 13:03, Michael S. Tsirkin wrote: > > > > On Thu, Sep 12, 2024 at 01:11:21AM -0700, syzbot wrote: > > > Hello, > > > > > > syzbot found the following issue on: >

[PATCH] virtio_ring: tag event_triggered as racy for KCSAN

2024-09-12 Thread Michael S. Tsirkin
. Cc: Marco Elver Reported-by: syzbot+8a02104389c2e0ef5...@syzkaller.appspotmail.com Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index be7309b

Re: [syzbot] [virt?] KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (4)

2024-09-12 Thread Michael S. Tsirkin
On Thu, Sep 12, 2024 at 03:48:32PM +0200, Marco Elver wrote: > On Thu, 12 Sept 2024 at 13:03, Michael S. Tsirkin wrote: > > > > On Thu, Sep 12, 2024 at 01:11:21AM -0700, syzbot wrote: > > > Hello, > > > > > > syzbot found the following issue on: >

Re: [syzbot] [virt?] KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (4)

2024-09-12 Thread Michael S. Tsirkin
On Thu, Sep 12, 2024 at 01:11:21AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:7c6a3a65ace7 minmax: reduce min/max macro expansion in ato.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=1608e49f98 > kernel

Re: [RESEND PATCH v1 0/7]vhost: Add support of kthread API

2024-09-11 Thread Michael S. Tsirkin
On Wed, Sep 11, 2024 at 11:20:30AM -0500, Mike Christie wrote: > If people are ok with something similar as in this patchset where > we have both vhost_tasks and kthreads, then I can send something. It would be better, as you say, to modify the vhost_task code so it can emulate the kthread behavi

Re: [RESEND PATCH v1 0/7]vhost: Add support of kthread API

2024-09-11 Thread Michael S. Tsirkin
On Wed, Sep 11, 2024 at 11:45:33AM +0800, Jason Wang wrote: > On Tue, Sep 10, 2024 at 4:43 PM Michael S. Tsirkin wrote: > > > > On Tue, Sep 10, 2024 at 04:37:52PM +0800, Jason Wang wrote: > > > On Tue, Sep 10, 2024 at 3:42 PM Michael S. Tsirkin > > > wrote: >

Re: [PATCH v1 0/5] virtio-mem: s390x support

2024-09-10 Thread Michael S. Tsirkin
lkml.kernel.org/r/20240910175809.2135596-1-da...@redhat.com > [2] https://gitlab.com/davidhildenbrand/s390x-os-virt-spec > [3] https://virtio-mem.gitlab.io/user-guide/user-guide-linux.html > > Cc: Heiko Carstens > Cc: Vasily Gorbik > Cc: Alexander Gordeev > Cc: Christian B

Re: [PATCH v1 3/5] virtio-mem: s390x support

2024-09-10 Thread Michael S. Tsirkin
27;t currently dump virtio-mem memory. The virtio-mem > driver has a special kdump mode, from where we can detect memory ranges > to dump. Based on this, support for dumping virtio-mem memory can be > added in the future fairly easily. > > Signed-off-by: David Hildenbrand Acked-by

Re: [RESEND PATCH v1 0/7]vhost: Add support of kthread API

2024-09-10 Thread Michael S. Tsirkin
On Tue, Sep 10, 2024 at 04:37:52PM +0800, Jason Wang wrote: > On Tue, Sep 10, 2024 at 3:42 PM Michael S. Tsirkin wrote: > > > > On Mon, Sep 09, 2024 at 10:00:38AM +0800, Cindy Lu wrote: > > > In commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"), &

Re: [RESEND PATCH v1 0/7]vhost: Add support of kthread API

2024-09-10 Thread Michael S. Tsirkin
On Mon, Sep 09, 2024 at 10:00:38AM +0800, Cindy Lu wrote: > In commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"), > vhost removed the support for the kthread API. However, there are > still situations where there is a request to use kthread. > In this PATCH, the support of kthread i

Re: [PATCH v3 0/2] Properly initialize speed/duplex and remove vDPA config updates

2024-09-09 Thread Michael S. Tsirkin
On Wed, Sep 04, 2024 at 10:11:13AM -0500, Carlos Bilbao wrote: > From: Carlos Bilbao > > Initialize speed and duplex for virtio_net_config to UNKNOWN (mlx5_vdpa > vDPA devices currently do not support VIRTIO_NET_F_SPEED_DUPLEX). Remove > ioctl VHOST_VDPA_SET_CONFIG and its related logic as it is

Re: [PATCH RFC 1/3] Revert "virtio_net: rx remove premapped failover code"

2024-09-08 Thread Michael S. Tsirkin
Could you pls repeat this testing for v2? I had to revert more patches for that one. On Wed, Aug 14, 2024 at 04:19:06PM +0100, Darren Kenny wrote: > Hi Michael, > > I've tested this on the system that was reproducing the panic, and it > everything is working now as expected. &g

Re: [RFC PATCH v2 5/7] Revert "virtio_net: rx remove premapped failover code"

2024-09-06 Thread Michael S. Tsirkin
On Fri, Sep 06, 2024 at 06:02:50PM +0800, Xuan Zhuo wrote: > On Fri, 6 Sep 2024 05:52:36 -0400, "Michael S. Tsirkin" > wrote: > > This reverts commit defd28aa5acb0fd7c15adc6bc40a8ac277d04dea. > > > > leads to crashes with no ACCESS_PLATFORM when > > sy

  1   2   3   4   5   6   7   8   9   10   >