Re: [PATCH v2 3/3] vhost/vsock: use netns of process that opens the vhost-vsock-netns device

2025-03-19 Thread Stefano Garzarella
On Wed, Mar 12, 2025 at 01:59:37PM -0700, Bobby Eshleman wrote: From: Stefano Garzarella This patch assigns the network namespace of the process that opened vhost-vsock-netns device (e.g. VMM) to the packets coming from the guest, allowing only host sockets in the same network namespace to comm

RE: [PATCH v5 10/10] Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs

2025-03-19 Thread Michael Kelley
From: Michael Kelley Sent: Tuesday, March 18, 2025 7:10 PM > > From: Nuno Das Neves Sent: Tuesday, March > 18, 2025 5:34 PM > > > > On 3/17/2025 4:51 PM, Michael Kelley wrote: > > > From: Nuno Das Neves Sent: Wednesday, > > > February 26, 2025 3:08 PM [snip] > > >> + > > >> +region

Re: [patch V4 09/14] PCI/MSI: Switch msix_capability_init() to guard(msi_desc_lock)

2025-03-19 Thread Bjorn Helgaas
On Wed, Mar 19, 2025 at 11:56:54AM +0100, Thomas Gleixner wrote: > Split the lock protected functionality of msix_capability_init() out into a > helper function and use guard(msi_desc_lock) to replace the lock/unlock > pair. > > Simplify the error path in the helper function by utilizing a custom

Re: [patch V4 08/14] PCI/MSI: Switch msi_capability_init() to guard(msi_desc_lock)

2025-03-19 Thread Bjorn Helgaas
On Wed, Mar 19, 2025 at 11:56:53AM +0100, Thomas Gleixner wrote: > Split the lock protected functionality of msi_capability_init() out into a > helper function and use guard(msi_desc_lock) to replace the lock/unlock > pair. > > No functional change intended. > > Signed-off-by: Thomas Gleixner A

Re: [patch V4 07/14] PCI/MSI: Use __free() for affinity masks

2025-03-19 Thread Bjorn Helgaas
On Wed, Mar 19, 2025 at 11:56:50AM +0100, Thomas Gleixner wrote: > Let cleanup handle the freeing of the affinity mask. That prepares for > switching the MSI descriptor locking to a guard(). > > No functional change. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > V4: Split

Re: [PATCH v2 2/9] dt-bindings: x86: Add a binding for x86 wakeup mailbox

2025-03-19 Thread Krzysztof Kozlowski
On 12/03/2025 06:51, Ricardo Neri wrote: > On Tue, Mar 11, 2025 at 11:01:28AM +0100, Krzysztof Kozlowski wrote: >> On 03/03/2025 23:21, Ricardo Neri wrote: >>> On Fri, Sep 20, 2024 at 01:15:41PM +0200, Krzysztof Kozlowski wrote: >>> >>> [...] >>> enable-method is part of CPUs, so you probabl

Re: [PATCH v2 3/3] vhost/vsock: use netns of process that opens the vhost-vsock-netns device

2025-03-19 Thread Paolo Abeni
On 3/12/25 9:59 PM, Bobby Eshleman wrote: > @@ -753,6 +783,8 @@ static int vhost_vsock_dev_release(struct inode *inode, > struct file *file) > virtio_vsock_skb_queue_purge(&vsock->send_pkt_queue); > > vhost_dev_cleanup(&vsock->dev); > + if (vsock->net) > + put_net(vso

RE: [PATCH hyperv-next v6 02/11] arm64: hyperv: Use SMCCC to detect hypervisor presence

2025-03-19 Thread Michael Kelley
From: Mark Rutland Sent: Monday, March 17, 2025 4:38 AM > > On Fri, Mar 14, 2025 at 05:19:22PM -0700, Roman Kisel wrote: > > The arm64 Hyper-V startup path relies on ACPI to detect > > running under a Hyper-V compatible hypervisor. That > > doesn't work on non-ACPI systems. > > > > Hoist the ACPI

[patch V4 02/14] genirq/msi: Use lock guards for MSI descriptor locking

2025-03-19 Thread Thomas Gleixner
Provide a lock guard for MSI descriptor locking and update the core code accordingly. No functional change intended. Signed-off-by: Thomas Gleixner Reviewed-by: Jonathan Cameron --- V2: Remove the gotos - Jonathan --- include/linux/irqdomain.h |2 include/linux/msi.h |3 + ker

[patch V4 01/14] cleanup: Provide retain_ptr()

2025-03-19 Thread Thomas Gleixner
In cases where an allocation is consumed by another function, the allocation needs to be retained on success or freed on failure. The code pattern is usually: struct foo *f = kzalloc(sizeof(*f), GFP_KERNEL); struct bar *b; ,,, // Initialize f ... if

[patch V4 05/14] PCI/MSI: Use guard(msi_desc_lock) where applicable

2025-03-19 Thread Thomas Gleixner
Convert the trivial cases of msi_desc_lock/unlock() pairs. No functional change. Signed-off-by: Thomas Gleixner --- V4: Split out from the previous combo patch --- drivers/pci/msi/api.c |6 ++ drivers/pci/msi/msi.c | 12 ++-- 2 files changed, 8 insertions(+), 10 deletions(-)

[patch V4 03/14] soc: ti: ti_sci_inta_msi: Switch MSI descriptor locking to guard()

2025-03-19 Thread Thomas Gleixner
Convert the code to use the new guard(msi_descs_lock). No functional change intended. Signed-off-by: Thomas Gleixner Tested-by: Nishanth Menon Reviewed-by: Jonathan Cameron Reviewed-by: Dhruva Gole Cc: Tero Kristo Cc: Santosh Shilimkar --- drivers/soc/ti/ti_sci_inta_msi.c | 10 +++-

[patch V4 09/14] PCI/MSI: Switch msix_capability_init() to guard(msi_desc_lock)

2025-03-19 Thread Thomas Gleixner
Split the lock protected functionality of msix_capability_init() out into a helper function and use guard(msi_desc_lock) to replace the lock/unlock pair. Simplify the error path in the helper function by utilizing a custom cleanup to get rid of the remaining gotos. No functional change intended.

[patch V4 08/14] PCI/MSI: Switch msi_capability_init() to guard(msi_desc_lock)

2025-03-19 Thread Thomas Gleixner
Split the lock protected functionality of msi_capability_init() out into a helper function and use guard(msi_desc_lock) to replace the lock/unlock pair. No functional change intended. Signed-off-by: Thomas Gleixner --- V4: Split out from the previous combo patch --- drivers/pci/msi/msi.c | 68

[patch V4 14/14] genirq/msi: Rename msi_[un]lock_descs()

2025-03-19 Thread Thomas Gleixner
Now that all abuse is gone and the legit users are converted to guard(msi_descs_lock), rename the lock functions and document them as internal. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Jonathan Cameron --- include/linux/msi.h |8 kernel/irq/msi.c|

[patch V4 10/14] PCI: hv: Switch MSI descriptor locking to guard()

2025-03-19 Thread Thomas Gleixner
Convert the code to use the new guard(msi_descs_lock). No functional change intended. Signed-off-by: Thomas Gleixner Reviewed-by: Jonathan Cameron Reviewed-by: Michael Kelley Acked-by: Wei Liu Acked-by: Bjorn Helgaas Cc: Haiyang Zhang Cc: linux-hyperv@vger.kernel.org Cc: linux-...@vger.kern

[patch V4 13/14] scsi: ufs: qcom: Remove the MSI descriptor abuse

2025-03-19 Thread Thomas Gleixner
The driver abuses the MSI descriptors for internal purposes. Aside of core code and MSI providers nothing has to care about their existence. They have been encapsulated with a lot of effort because this kind of abuse caused all sorts of issues including a maintainability nightmare. Rewrite the cod

[patch V4 00/14] genirq/msi: Spring cleaning

2025-03-19 Thread Thomas Gleixner
This is version 4 of the cleanup work. The previous version can be found here: https://lore.kernel.org/all/20250317092919.008573...@linutronix.de While converting the MSI descriptor locking to a lock guard() I stumbled over various abuse of MSI descriptors (again). The following series cleans

[patch V4 11/14] PCI/MSI: Provide a sane mechanism for TPH

2025-03-19 Thread Thomas Gleixner
The PCI/TPH driver fiddles with the MSI-X control word of an active interrupt completely unserialized against concurrent operations issued from the interrupt core. It also brings the PCI/MSI-X internal cached control word out of sync. Provide a function, which has the required serialization and ke

[patch V4 06/14] PCI/MSI: Set pci_dev::msi_enabled late

2025-03-19 Thread Thomas Gleixner
The comment claiming that pci_dev::msi_enabled has to be set across setup is a leftover from ancient code versions. Nothing in the setup code requires the flag to be set anymore. Set it in the success path and remove the extra goto label. Signed-off-by: Thomas Gleixner --- V4: New patch --- dri

[patch V4 04/14] NTB/msi: Switch MSI descriptor locking to lock guard()

2025-03-19 Thread Thomas Gleixner
Convert the code to use the new guard(msi_descs_lock). No functional change intended. Signed-off-by: Thomas Gleixner Reviewed-by: Jonathan Cameron Reviewed-by: Logan Gunthorpe Acked-by: Dave Jiang Cc: Jon Mason Cc: Allen Hubbe Cc: n...@lists.linux.dev --- drivers/ntb/msi.c | 22 ++

[patch V4 07/14] PCI/MSI: Use __free() for affinity masks

2025-03-19 Thread Thomas Gleixner
Let cleanup handle the freeing of the affinity mask. That prepares for switching the MSI descriptor locking to a guard(). No functional change. Signed-off-by: Thomas Gleixner --- V4: Split out of the previous combo patch --- drivers/pci/msi/msi.c | 13 - 1 file changed, 4 insertio

Re: [PATCH v2 1/3] vsock: add network namespace support

2025-03-19 Thread Stefano Garzarella
On Wed, Mar 12, 2025 at 01:59:35PM -0700, Bobby Eshleman wrote: From: Stefano Garzarella This patch adds a check of the "net" assigned to a socket during the vsock_find_bound_socket() and vsock_find_connected_socket() to support network namespace, allowing to share the same address (cid, port)

Re: [PATCH v5 10/10] Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs

2025-03-19 Thread Nuno Das Neves
On 3/19/2025 8:26 AM, Michael Kelley wrote: > From: Michael Kelley Sent: Tuesday, March 18, 2025 > 7:10 PM >> >> From: Nuno Das Neves Sent: Tuesday, March >> 18, 2025 5:34 PM >>> >>> On 3/17/2025 4:51 PM, Michael Kelley wrote: From: Nuno Das Neves Sent: Wednesday, February 26, 2025 3

Re: [patch V4 05/14] PCI/MSI: Use guard(msi_desc_lock) where applicable

2025-03-19 Thread Bjorn Helgaas
On Wed, Mar 19, 2025 at 11:56:47AM +0100, Thomas Gleixner wrote: > Convert the trivial cases of msi_desc_lock/unlock() pairs. > > No functional change. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > V4: Split out from the previous combo patch > --- > drivers/pci/msi/api.c

Re: [PATCH v2] uio_hv_generic: Fix sysfs creation path for ring buffer

2025-03-19 Thread Greg Kroah-Hartman
On Wed, Mar 19, 2025 at 07:05:56PM +0530, Naman Jain wrote: > On 3/18/2025 6:58 PM, Greg Kroah-Hartman wrote: > > > +/* > > > + * hv_create_ring_sysfs - create ring sysfs entry corresponding to ring > > > buffers for a channel > > > + */ > > > > Kerneldoc? > > Documentation of the ring sysfs is

Re: [PATCH v2 1/3] vsock: add network namespace support

2025-03-19 Thread Bobby Eshleman
On Wed, Mar 19, 2025 at 02:02:32PM +0100, Stefano Garzarella wrote: > On Wed, Mar 12, 2025 at 01:59:35PM -0700, Bobby Eshleman wrote: > > From: Stefano Garzarella > > > > This patch adds a check of the "net" assigned to a socket during > > the vsock_find_bound_socket() and vsock_find_connected_so

Re: [PATCH v2 2/3] vsock/virtio_transport_common: handle netns of received packets

2025-03-19 Thread Bobby Eshleman
On Wed, Mar 19, 2025 at 02:26:04PM +0100, Stefano Garzarella wrote: > On Wed, Mar 12, 2025 at 01:59:36PM -0700, Bobby Eshleman wrote: > > From: Stefano Garzarella > > > > This patch allows transports that use virtio_transport_common > > to specify the network namespace where a received packet is

Re: [PATCH v2 3/3] vhost/vsock: use netns of process that opens the vhost-vsock-netns device

2025-03-19 Thread Bobby Eshleman
On Wed, Mar 19, 2025 at 03:15:36PM +0100, Stefano Garzarella wrote: > On Wed, Mar 12, 2025 at 01:59:37PM -0700, Bobby Eshleman wrote: > > From: Stefano Garzarella > > > > This patch assigns the network namespace of the process that opened > > vhost-vsock-netns device (e.g. VMM) to the packets com

Re: [patch V4 01/14] cleanup: Provide retain_ptr()

2025-03-19 Thread James Bottomley
On Wed, 2025-03-19 at 11:56 +0100, Thomas Gleixner wrote: > In cases where an allocation is consumed by another function, the > allocation needs to be retained on success or freed on failure. The > code > pattern is usually: > > struct foo *f = kzalloc(sizeof(*f), GFP_KERNEL); > struct

Re: [PATCH v2] uio_hv_generic: Fix sysfs creation path for ring buffer

2025-03-19 Thread Naman Jain
On 3/18/2025 6:58 PM, Greg Kroah-Hartman wrote: On Tue, Mar 18, 2025 at 11:45:58AM +0530, Naman Jain wrote: On regular bootup, devices get registered to vmbus first, so when uio_hv_generic driver for a particular device type is probed, the device is already initialized and added, so sysfs cre

Re: [PATCH v2 2/3] vsock/virtio_transport_common: handle netns of received packets

2025-03-19 Thread Stefano Garzarella
On Wed, Mar 12, 2025 at 01:59:36PM -0700, Bobby Eshleman wrote: From: Stefano Garzarella This patch allows transports that use virtio_transport_common to specify the network namespace where a received packet is to be delivered. virtio_transport and vhost_transport, for now, still do not use th

Re: [patch V4 06/14] PCI/MSI: Set pci_dev::msi_enabled late

2025-03-19 Thread Bjorn Helgaas
On Wed, Mar 19, 2025 at 11:56:49AM +0100, Thomas Gleixner wrote: > The comment claiming that pci_dev::msi_enabled has to be set across setup > is a leftover from ancient code versions. Nothing in the setup code > requires the flag to be set anymore. > > Set it in the success path and remove the ex