source
large_stringclasses
2 values
subject
large_stringclasses
112 values
code
large_stringclasses
112 values
critique
large_stringlengths
61
3.04M
metadata
dict
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On Mon, Jan 19, 2026 at 10:42:24PM -0800, Mukesh R wrote: <snip> Shouldn't the inner struct be packed instead? Why should the union be packed? Thanks, Stanislav
{ "author": "Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>", "date": "Tue, 20 Jan 2026 14:17:24 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On Mon, Jan 19, 2026 at 10:42:25PM -0800, Mukesh R wrote: Why not moving this static function definition above the called instead of defining the prototype? This variable is redundant. It looks like this value always fits into 32 bit, so what is the value in returning 64 bit? Thanks, Stanislav
{ "author": "Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>", "date": "Tue, 20 Jan 2026 14:22:23 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On Mon, Jan 19, 2026 at 10:42:26PM -0800, Mukesh R wrote: Should this one be renamed into hv_build_devid_type_vmbus() to align with the other two function names? Thanks, Stanislav
{ "author": "Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>", "date": "Tue, 20 Jan 2026 14:27:33 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On Mon, Jan 19, 2026 at 10:42:27PM -0800, Mukesh R wrote: <snip> The return above is never reached. hvdom varaible is redundant. Why goto here and not return NULL like above? Shouldn't this be modified iff the detach succeeded? There is some inconsistency in namings and behaviour of paired functions: 1. The ...
{ "author": "Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>", "date": "Tue, 20 Jan 2026 16:12:42 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On Mon, Jan 19, 2026 at 10:42:28PM -0800, Mukesh R wrote: l1vh and root are mutually exclusive partitions. If you wanted to highlight that it's l1vh itself and not its child guest, then "l1vh parent" term would do. Looks like the only special case is for attached logical devices, otherwise hv_current_partition_id is...
{ "author": "Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>", "date": "Tue, 20 Jan 2026 16:47:07 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
Hi Mukesh, kernel test robot noticed the following build warnings: [auto build test WARNING on tip/x86/core] [also build test WARNING on pci/next pci/for-linus arm64/for-next/core clk/clk-next soc/for-next linus/master v6.19-rc6 next-20260120] [cannot apply to arnd-asm-generic/master] [If your patch is applied to the...
{ "author": "kernel test robot <lkp@intel.com>", "date": "Wed, 21 Jan 2026 08:53:50 +0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On Mon, Jan 19, 2026 at 10:42:29PM -0800, Mukesh R wrote: No need updating ret here: it's 0 after the previous call. Thanks, Stanislav
{ "author": "Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>", "date": "Tue, 20 Jan 2026 17:41:39 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On Mon, Jan 19, 2026 at 10:42:30PM -0800, Mukesh R wrote: Semaphore can't be taken under spinlock. Get it instead. Why this check is needed again? The region type is stored on the region itself. And the type is checked on the caller side. This call needs to be protected by the spinlock. Thanks, Stanislav
{ "author": "Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>", "date": "Tue, 20 Jan 2026 17:53:29 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
Hi Mukesh, On Mon, 19 Jan 2026 22:42:27 -0800 Mukesh R <mrathor@linux.microsoft.com> wrote: Given we are also developing a guest iommu driver on hyperv, I think it is more clear to name them accordingly. Perhaps, hyperv-iommu-root.c? Will this driver be x86 only? DMA and IRQ remapping should be separate I don't th...
{ "author": "Jacob Pan <jacob.pan@linux.microsoft.com>", "date": "Wed, 21 Jan 2026 21:18:06 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/19/2026 10:42 PM, Mukesh R wrote: This should go inside the #if IS_ENABLED(CONFIG_MSHV_ROOT) section.
{ "author": "Nuno Das Neves <nunodasneves@linux.microsoft.com>", "date": "Fri, 23 Jan 2026 10:23:04 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/19/2026 10:42 PM, Mukesh R wrote: With this commit, the IOCTL number is exposed to userspace but it doesn't work. Ideally the IOCTL number should be added in the commit where it becomes usable.
{ "author": "Nuno Das Neves <nunodasneves@linux.microsoft.com>", "date": "Fri, 23 Jan 2026 10:25:36 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/19/2026 10:42 PM, Mukesh R wrote: Since the code is very similar to Wei's original commit, the way I'd recommend to do it is: 1. Change the commit author to Wei, using git commit --amend --author= and 2. Put his signed-off line before yours: Signed-off-by: Wei Liu <wei.liu@kernel.org> Signed-off-by: Mukesh Ratho...
{ "author": "Nuno Das Neves <nunodasneves@linux.microsoft.com>", "date": "Fri, 23 Jan 2026 10:32:09 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/19/2026 10:42 PM, Mukesh R wrote: What is the reason for having this as a separate commit from patch 15? It seems like removing this code and adding the mmio intercept handling could be done in one patch.
{ "author": "Nuno Das Neves <nunodasneves@linux.microsoft.com>", "date": "Fri, 23 Jan 2026 10:34:55 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/23/26 10:25, Nuno Das Neves wrote: Correct, I switched it because the next patch won't compile without it as it needs the declarations here. It could be combined into one big patch, but I think normally one would not expect full functionality until the release is certified to be that feature compliant anyways. H...
{ "author": "Mukesh R <mrathor@linux.microsoft.com>", "date": "Fri, 23 Jan 2026 16:36:28 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/23/26 10:32, Nuno Das Neves wrote: Perfect! Thank you, that is exactly the information I was trying to seek... makes sense. Thanks, -Mukesh
{ "author": "Mukesh R <mrathor@linux.microsoft.com>", "date": "Fri, 23 Jan 2026 16:37:34 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/20/26 14:17, Stanislav Kinsburskii wrote: From GCC docs: Specifying this attribute for struct and union types is equivalent to specifying the packed attribute on each of the structure or union members. Thanks, -Mukesh
{ "author": "Mukesh R <mrathor@linux.microsoft.com>", "date": "Fri, 23 Jan 2026 16:38:56 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/20/26 14:22, Stanislav Kinsburskii wrote: Did you see the function implementation? It has other dependencies that are later, it would need code reorg. Thanks, -Mukesh Not really. It helps with debug by putting a quick print, and is harmless. The ABI has device id defined as 64bits where this is assigned. T...
{ "author": "Mukesh R <mrathor@linux.microsoft.com>", "date": "Fri, 23 Jan 2026 16:42:54 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/20/26 14:27, Stanislav Kinsburskii wrote: No, because hyperv only defines two types of device ids, and it would unnecessary at to confusion. vmbus uses one the two types of device ids.
{ "author": "Mukesh R <mrathor@linux.microsoft.com>", "date": "Fri, 23 Jan 2026 16:44:01 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/20/26 16:12, Stanislav Kinsburskii wrote: Some debug code there got removed. Will fix in next version. We want to still free the domain and not let it get stuck. The purpose is more to make sure detach was called before domain free. The pair of hv_iommu_unmap_pages is hv_iommu_map_pages right above. hv_iommu_...
{ "author": "Mukesh R <mrathor@linux.microsoft.com>", "date": "Fri, 23 Jan 2026 17:26:19 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/21/26 21:18, Jacob Pan wrote: well, l1vh is not quite root, more like a parent. But we've been using l1vh root loosely to mean l1vh parent. so probably ok to rename it to hyperv-iommu-root.c. I prefer not calling it parent or something like that. j Yes for now. not sure i follow. Well, it is getting the inf...
{ "author": "Mukesh R <mrathor@linux.microsoft.com>", "date": "Fri, 23 Jan 2026 18:01:29 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/20/26 16:47, Stanislav Kinsburskii wrote: We've been loosely using "l1vh root" to mean "privilated l1vh" as opposed to l1vh guests. I think that is fine. l1vh parent is confusing, as it may also refer to l1vh parent, which would be the host. so as long as the context is clear, we are ok. Could be, but at the co...
{ "author": "Mukesh R <mrathor@linux.microsoft.com>", "date": "Fri, 23 Jan 2026 18:08:49 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/23/26 10:34, Nuno Das Neves wrote: Just ease of review and porting patches from this branch to that branch to that release to this release... I am sure someone would have asked for this to be a separate patch :). Thanks, -Mukesh
{ "author": "Mukesh R <mrathor@linux.microsoft.com>", "date": "Fri, 23 Jan 2026 18:12:14 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/20/26 17:53, Stanislav Kinsburskii wrote: Yeah, something didn't feel right here and I meant to recheck, now regret rushing to submit the patch. Rethinking, I think the pt_mem_regions_lock is not needed to protect the uaddr because unmap will properly serialize via the mm lock. To make sure region did not cha...
{ "author": "Mukesh R <mrathor@linux.microsoft.com>", "date": "Fri, 23 Jan 2026 18:19:15 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/20/26 13:50, Jacob Pan wrote: Ok, i can add something, but l1vh was very well introduced if you search the mshv commits for "l1vh". sure. Yeah, I was hoping we can get by for now without it. At least in case of the cloud hypervisor, entire guest ram is mapped anyways. We can document it and work on enhancemen...
{ "author": "Mukesh R <mrathor@linux.microsoft.com>", "date": "Fri, 23 Jan 2026 18:27:34 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On Fri, Jan 23, 2026 at 05:26:19PM -0800, Mukesh R wrote: <snip> How can one debug subseqent errors if num_attchd is decremented unconditionally? In reality the device is left attached, but the related kernel metadata is gone. Hv_iommu_map_pages is a wrapper around hv_iommu_map_pgs while hv_iommu_unmap_pages is a ...
{ "author": "Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>", "date": "Mon, 26 Jan 2026 07:57:35 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On Fri, Jan 23, 2026 at 06:19:15PM -0800, Mukesh R wrote: How can this happen? One can't change VMA type without unmapping it first. And unmapping it leads to a kernel MMIO region state dangling around without corresponding user space mapping. This is similar to dangling pinned regions and should likely be addressed...
{ "author": "Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>", "date": "Mon, 26 Jan 2026 10:15:53 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On Fri, Jan 23, 2026 at 04:42:54PM -0800, Mukesh R wrote: Why not placing the caller side after the function definition then? Thanks, Stanislav
{ "author": "Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>", "date": "Mon, 26 Jan 2026 12:50:03 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/26/26 07:57, Stanislav Kinsburskii wrote: Error is printed in case of failed detach. If there is panic, at least you can get some info about the device. Metadata in hypervisor is around if failed. Unmap does not need intermediate function. We print error upon its failure in hv_iommu_map_pages(): ...
{ "author": "Mukesh R <mrathor@linux.microsoft.com>", "date": "Mon, 26 Jan 2026 19:02:29 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/26/26 10:15, Stanislav Kinsburskii wrote: Right, and vm_flags would not be mmio expected then. I don't think we need that. Either it succeeds if the region did not change at all, or just fails. I am not sure why? This check is done by a vcpu thread, so regions will not have just gone away. Thanks, -Mukesh
{ "author": "Mukesh R <mrathor@linux.microsoft.com>", "date": "Mon, 26 Jan 2026 19:07:22 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On Mon, Jan 26, 2026 at 07:02:29PM -0800, Mukesh R wrote: With this approach the only thing left is a kernel message. But if the state is kept intact, one could collect a kernel core and analyze it. And note, that there won't be a hypervisor core by default: our main context with the usptreamed version of the driver ...
{ "author": "Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>", "date": "Tue, 27 Jan 2026 10:46:49 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On Mon, Jan 26, 2026 at 07:07:22PM -0800, Mukesh R wrote: I'm afraid we do, as if the driver mapped a page with the previous memory region, and then the region is unmapped, the page will stay mapped in the hypervisor, but will be considered free by kernel, which in turn will lead to GPF upn next allocation. With pinn...
{ "author": "Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>", "date": "Tue, 27 Jan 2026 10:57:08 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
Hi Mukesh, On Fri, 23 Jan 2026 18:01:29 -0800 Mukesh R <mrathor@linux.microsoft.com> wrote: yeah, something specific and different than the guest driver will do. If there is nothing x86 specific in this driver (assuming the hypercalls here are not x86 only), maybe you can move to the generic startup code. In IOMMU ...
{ "author": "Jacob Pan <jacob.pan@linux.microsoft.com>", "date": "Tue, 27 Jan 2026 11:21:44 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
Hi Mukesh, On second thought, if the hv_no_attdev knob is only meant to control host domain attach vs. direct attach, then it is irrelevant on L1VH. Would it make more sense to rename this to something like hv_host_disable_direct_attach? That would better reflect its scope and allow it to be ignored under L1VH, and r...
{ "author": "Jacob Pan <jacob.pan@linux.microsoft.com>", "date": "Tue, 27 Jan 2026 14:31:19 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On Mon, Jan 19, 2026 at 10:42:23PM -0800, Mukesh R wrote: Don't mix up cleanup changes. Do it in a separate patch. - Mani -- மணிவண்ணன் சதாசிவம்
{ "author": "Manivannan Sadhasivam <mani@kernel.org>", "date": "Wed, 28 Jan 2026 19:33:57 +0530", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On Fri, Jan 23, 2026 at 04:42:54PM -0800, Mukesh R wrote: Such debug print do not exist now. So there is no need of a variable, drop it. - Mani -- மணிவண்ணன் சதாசிவம்
{ "author": "Manivannan Sadhasivam <mani@kernel.org>", "date": "Wed, 28 Jan 2026 20:06:21 +0530", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/27/26 14:31, Jacob Pan wrote: It would, but it is kernel parameter and needs to be terse. It would be documented properly tho, so we should be ok. Thanks, -Mukesh
{ "author": "Mukesh R <mrathor@linux.microsoft.com>", "date": "Fri, 30 Jan 2026 14:10:57 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/27/26 10:57, Stanislav Kinsburskii wrote: There are no ram pages for mmio regions. Also, we don't do much with mmio regions other than tell the hyp about it. Thanks, -Mukesh
{ "author": "Mukesh R <mrathor@linux.microsoft.com>", "date": "Fri, 30 Jan 2026 14:17:24 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/27/26 10:46, Stanislav Kinsburskii wrote: Again, most of linux stuff is cleaned up, the only state is in hypervisor, and hypervisor can totally protect itself and devices. So there is not much in kernel core as it got cleaned up already. Think of this as additional check, we can remove in future after it stands t...
{ "author": "Mukesh R <mrathor@linux.microsoft.com>", "date": "Fri, 30 Jan 2026 14:51:19 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On 1/27/26 11:21, Jacob Pan wrote: It's x86 specific: x86_init.iommu.iommu_init = hv_iommu_init oh, you are talking about the config option, yeah, I will move CONFIG_IRQ_REMAP from Kconfig to here. it could, but by convention all public funcs here are hv_iommu_xxx.. and other reviewers might object... W...
{ "author": "Mukesh R <mrathor@linux.microsoft.com>", "date": "Fri, 30 Jan 2026 15:44:37 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On Fri, Jan 30, 2026 at 02:51:19PM -0800, Mukesh R wrote: Again, the hypervisor state is not accessible from the kernel core in L1VH. In upstream, it does not matter what the work is focused on. The only thing that matters is that the functionality is merged and available. Once the code is merged upstream, it become...
{ "author": "Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>", "date": "Mon, 2 Feb 2026 08:20:37 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH v0 00/15] PCI passthru on Hyper-V (Part I)
From: Mukesh Rathor <mrathor@linux.microsoft.com> Implement passthru of PCI devices to unprivileged virtual machines (VMs) when Linux is running as a privileged VM on Microsoft Hyper-V hypervisor. This support is made to fit within the workings of VFIO framework, and any VMM needing to use it must use the VFIO subsyst...
On Fri, Jan 30, 2026 at 02:17:24PM -0800, Mukesh R wrote: So, are you saying that the hypervisor does not use these pages and only tracks them? That would make things easier. However, if we later try to map a GPA that is already mapped, will the hypervisor return an error? Thanks, Stanislav
{ "author": "Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>", "date": "Mon, 2 Feb 2026 08:30:49 -0800", "thread_id": "aYDROXpR5kvlylGG@skinsburskii.localdomain.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
Modify online_memory_block() to accept the online type through its arg parameter rather than calling mhp_get_default_online_type() internally. This prepares for allowing callers to specify explicit online types. Update the caller in add_memory_resource() to pass the default online type via a local variable. No functi...
{ "author": "Gregory Price <gourry@gourry.net>", "date": "Thu, 29 Jan 2026 16:04:34 -0500", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
Enable dax kmem driver to select how to online the memory rather than implicitly depending on the system default. This will allow users of dax to plumb through a preferred auto-online policy for their region. Refactor and new interface: Add __add_memory_driver_managed() which accepts an explicit online_type and expor...
{ "author": "Gregory Price <gourry@gourry.net>", "date": "Thu, 29 Jan 2026 16:04:35 -0500", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
There is no way for drivers leveraging dax_kmem to plumb through a preferred auto-online policy - the system default policy is forced. Add online_type field to DAX device creation path to allow drivers to specify an auto-online policy when using the kmem driver. Current callers initialize online_type to mhp_get_defau...
{ "author": "Gregory Price <gourry@gourry.net>", "date": "Thu, 29 Jan 2026 16:04:36 -0500", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
Move the pmem region driver logic from region.c into pmem_region.c. No functional changes. Signed-off-by: Gregory Price <gourry@gourry.net> --- drivers/cxl/core/Makefile | 1 + drivers/cxl/core/core.h | 1 + drivers/cxl/core/pmem_region.c | 191 +++++++++++++++++++++++++++++++++ drivers/cxl/core/regi...
{ "author": "Gregory Price <gourry@gourry.net>", "date": "Thu, 29 Jan 2026 16:04:38 -0500", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
Move the CXL DAX region device infrastructure from region.c into a new dax_region.c file. No functional changes. Signed-off-by: Gregory Price <gourry@gourry.net> --- drivers/cxl/core/Makefile | 1 + drivers/cxl/core/core.h | 1 + drivers/cxl/core/dax_region.c | 113 ++++++++++++++++++++++++++++++++++ d...
{ "author": "Gregory Price <gourry@gourry.net>", "date": "Thu, 29 Jan 2026 16:04:39 -0500", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
Add a new cxl_devdax_region driver that probes CXL regions in device dax mode and creates dax_region devices. This allows explicit binding to the device_dax dax driver instead of the kmem driver. Exports to_cxl_region() to core.h so it can be used by the driver. Signed-off-by: Gregory Price <gourry@gourry.net> --- d...
{ "author": "Gregory Price <gourry@gourry.net>", "date": "Thu, 29 Jan 2026 16:04:40 -0500", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
CXL regions may wish not to auto-configure their memory as dax kmem, but the current plumbing defaults all cxl-created dax devices to the kmem driver. This exposes them to hotplug policy, even if the user intends to use the memory as a dax device. Add plumbing to allow CXL drivers to select whether a DAX region shoul...
{ "author": "Gregory Price <gourry@gourry.net>", "date": "Thu, 29 Jan 2026 16:04:37 -0500", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
Explain the binding process for sysram and daxdev regions which are explicit about which dax driver to use during region creation. Jonathan Corbet <corbet@lwn.net> Signed-off-by: Gregory Price <gourry@gourry.net> --- .../driver-api/cxl/linux/cxl-driver.rst | 43 +++++++++++++++++++ .../driver-api/cxl/linux/dax...
{ "author": "Gregory Price <gourry@gourry.net>", "date": "Thu, 29 Jan 2026 16:04:42 -0500", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
In the current kmem driver binding process, the only way for users to define hotplug policy is via a build-time option, or by not onlining memory by default and setting each individual memory block online after hotplug occurs. We can solve this with a configuration step between region-probe and dax-probe. Add the inf...
{ "author": "Gregory Price <gourry@gourry.net>", "date": "Thu, 29 Jan 2026 16:04:41 -0500", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
Annoyingly, my email client has been truncating my titles: cxl: explicit DAX driver selection and hotplug policy for CXL regions ~Gregory
{ "author": "Gregory Price <gourry@gourry.net>", "date": "Thu, 29 Jan 2026 16:17:55 -0500", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
On Thu, Jan 29, 2026 at 04:04:33PM -0500, Gregory Price wrote: Looks like build regression on configs without hotplug MMOP_ defines and mhp_get_default_online_type() undefined Will let this version sit for a bit before spinning a v2 ~Gregory
{ "author": "Gregory Price <gourry@gourry.net>", "date": "Fri, 30 Jan 2026 12:34:33 -0500", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
On 1/29/2026 3:04 PM, Gregory Price wrote: This technically comes up in the devdax_region driver patch first, but I noticed it here so this is where I'm putting it: I like the idea here, but the implementation is all off. Firstly, devm_cxl_add_sysram_region() is never called outside of sysram_region_driver::probe(), ...
{ "author": "\"Cheatham, Benjamin\" <benjamin.cheatham@amd.com>", "date": "Fri, 30 Jan 2026 15:27:12 -0600", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
On Fri, Jan 30, 2026 at 03:27:12PM -0600, Cheatham, Benjamin wrote: I originally tried doing with region0/region_driver, but that design pattern is also confusing - and it creates differently bad patterns. echo region0 > decoder0.0/create_ram_region -> creates region0 # Current pattern echo region > dr...
{ "author": "Gregory Price <gourry@gourry.net>", "date": "Fri, 30 Jan 2026 17:12:50 -0500", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
On 1/30/2026 4:12 PM, Gregory Price wrote: Ok, that makes sense. I think I just got lost in the sauce while looking at this last week and this explanation helped a lot.> I think this was the source of my misunderstanding. I was trying to understand how it works for auto regions when it's never meant to apply to them...
{ "author": "\"Cheatham, Benjamin\" <benjamin.cheatham@amd.com>", "date": "Mon, 2 Feb 2026 11:02:37 -0600", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
On Thu, 29 Jan 2026 16:04:34 -0500 Gregory Price <gourry@gourry.net> wrote: Trivial comment inline. I don't really care either way. Pushing the policy up to the caller and ensuring it's explicitly constant for all the memory blocks (as opposed to relying on locks) seems sensible to me even without anything else. Rev...
{ "author": "Jonathan Cameron <jonathan.cameron@huawei.com>", "date": "Mon, 2 Feb 2026 17:10:29 +0000", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
On Thu, 29 Jan 2026 16:04:35 -0500 Gregory Price <gourry@gourry.net> wrote: Hi Gregory, I think maybe I'd have left the export for the first user outside of memory_hotplug.c. Not particularly important however. Maybe talk about why a caller of __add_memory_driver_managed() might want the default? Feels like that's...
{ "author": "Jonathan Cameron <jonathan.cameron@huawei.com>", "date": "Mon, 2 Feb 2026 17:25:24 +0000", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
On Mon, Feb 02, 2026 at 11:02:37AM -0600, Cheatham, Benjamin wrote: Auto regions explicitly use the dax_kmem path (all existing code, unchanged)- which auto-plugs into dax/hotplug. I do get what you're saying that everything binds on a region type, I will look a little closer at this and see if there's something more...
{ "author": "Gregory Price <gourry@gourry.net>", "date": "Mon, 2 Feb 2026 12:41:31 -0500", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
On Mon, Feb 02, 2026 at 05:10:29PM +0000, Jonathan Cameron wrote: ack. will update for next version w/ Ben's notes and the build fix. Thanks! ~Gregory
{ "author": "Gregory Price <gourry@gourry.net>", "date": "Mon, 2 Feb 2026 12:46:25 -0500", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
On Thu, 29 Jan 2026 16:04:37 -0500 Gregory Price <gourry@gourry.net> wrote: LGTM Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
{ "author": "Jonathan Cameron <jonathan.cameron@huawei.com>", "date": "Mon, 2 Feb 2026 17:54:17 +0000", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
On Thu, 29 Jan 2026 16:04:38 -0500 Gregory Price <gourry@gourry.net> wrote: Needs to answer the question: Why? Minor stuff inline. Maybe sneak in dropping that trailing comma whilst you are moving it. ... Bonus line...
{ "author": "Jonathan Cameron <jonathan.cameron@huawei.com>", "date": "Mon, 2 Feb 2026 17:56:40 +0000", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
On Thu, 29 Jan 2026 16:04:39 -0500 Gregory Price <gourry@gourry.net> wrote: Likewise. Why?
{ "author": "Jonathan Cameron <jonathan.cameron@huawei.com>", "date": "Mon, 2 Feb 2026 17:57:11 +0000", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCH 0/9] cxl: explicit DAX driver selection and hotplug
Currently, CXL regions that create DAX devices have no mechanism to control select the hotplug online policy for kmem regions at region creation time. Users must either rely on a build-time default or manually configure each memory block after hotplug occurs. Additionally, there is no explicit way to choose between de...
On Mon, Feb 02, 2026 at 05:25:24PM +0000, Jonathan Cameron wrote: Less about why they want the default, more about maintaining backward compatibility. In the cxl driver, Ben pointed out something that made me realize we can change `region/bind()` to actually use the new `sysram/bind` path by just adding a one line `s...
{ "author": "Gregory Price <gourry@gourry.net>", "date": "Mon, 2 Feb 2026 13:02:10 -0500", "thread_id": "aYDi8bhxFnvMWl11@gourry-fedora-PF4VCD3F.mbox.gz" }
lkml
[PATCHv3] dmaengine: tegra210-adma: use devm_platform_ioremap_resource
Simpler to call the proper function. Signed-off-by: Rosen Penev <rosenp@gmail.com> Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> --- v3: reword title v2: reword commit message drivers/dma/tegra210-adma.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/dma/tegra210-adma...
On Sun, Feb 01, 2026 at 07:44:19PM -0800, Rosen Penev wrote: subject: function name need () dmaengine: tegra210-adma: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify code. No funcational change. Frank
{ "author": "Frank Li <Frank.li@nxp.com>", "date": "Mon, 2 Feb 2026 11:46:30 -0500", "thread_id": "aYDU5na1HxkPRvwR@lizhi-Precision-Tower-5810.mbox.gz" }
lkml
[PATCH -next v2 0/4] cgroup/dmem: bugfixes
From: Chen Ridong <chenridong@huawei.com> This patch series addresses three existing bugs in the cgroup/dmem subsystem and adds a safety check for an exported API to prevent misuse. --- v2: - patch 1/4: fix uninitialized region. - patch 4/4: new patch adding check for exported API. Chen Ridong (4): cgroup/dmem: ...
From: Chen Ridong <chenridong@huawei.com> Add WARN_ON_ONCE guards for NULL-sensitive arguments in dmem helpers to avoid NULL dereferences on misused APIs. Valid callers are unaffected. Signed-off-by: Chen Ridong <chenridong@huawei.com> --- kernel/cgroup/dmem.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), ...
{ "author": "Chen Ridong <chenridong@huaweicloud.com>", "date": "Mon, 2 Feb 2026 12:27:19 +0000", "thread_id": "a3f6882172c7a1d1e335259675cc8ff5@kernel.org.mbox.gz" }
lkml
[PATCH -next v2 0/4] cgroup/dmem: bugfixes
From: Chen Ridong <chenridong@huawei.com> This patch series addresses three existing bugs in the cgroup/dmem subsystem and adds a safety check for an exported API to prevent misuse. --- v2: - patch 1/4: fix uninitialized region. - patch 4/4: new patch adding check for exported API. Chen Ridong (4): cgroup/dmem: ...
From: Chen Ridong <chenridong@huawei.com> A warnning was detected: WARNING: suspicious RCU usage 6.19.0-rc7-next-20260129+ #1101 Tainted: G O kernel/cgroup/dmem.c:456 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock ...
{ "author": "Chen Ridong <chenridong@huaweicloud.com>", "date": "Mon, 2 Feb 2026 12:27:17 +0000", "thread_id": "a3f6882172c7a1d1e335259675cc8ff5@kernel.org.mbox.gz" }
lkml
[PATCH -next v2 0/4] cgroup/dmem: bugfixes
From: Chen Ridong <chenridong@huawei.com> This patch series addresses three existing bugs in the cgroup/dmem subsystem and adds a safety check for an exported API to prevent misuse. --- v2: - patch 1/4: fix uninitialized region. - patch 4/4: new patch adding check for exported API. Chen Ridong (4): cgroup/dmem: ...
From: Chen Ridong <chenridong@huawei.com> An issue was triggered: BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: Oops: 0000 [#1] SMP NOPTI CPU: 15 UID: 0 PID: 658 Comm: bash Tainted: 6.19.0-r...
{ "author": "Chen Ridong <chenridong@huaweicloud.com>", "date": "Mon, 2 Feb 2026 12:27:16 +0000", "thread_id": "a3f6882172c7a1d1e335259675cc8ff5@kernel.org.mbox.gz" }
lkml
[PATCH -next v2 0/4] cgroup/dmem: bugfixes
From: Chen Ridong <chenridong@huawei.com> This patch series addresses three existing bugs in the cgroup/dmem subsystem and adds a safety check for an exported API to prevent misuse. --- v2: - patch 1/4: fix uninitialized region. - patch 4/4: new patch adding check for exported API. Chen Ridong (4): cgroup/dmem: ...
From: Chen Ridong <chenridong@huawei.com> An UAF issue was observed: BUG: KASAN: slab-use-after-free in page_counter_uncharge+0x65/0x150 Write of size 8 at addr ffff888106715440 by task insmod/527 CPU: 4 UID: 0 PID: 527 Comm: insmod 6.19.0-rc7-next-20260129+ #11 Tainted: [O]=OOT_MODULE Call Trace: <TASK> dump_sta...
{ "author": "Chen Ridong <chenridong@huaweicloud.com>", "date": "Mon, 2 Feb 2026 12:27:18 +0000", "thread_id": "a3f6882172c7a1d1e335259675cc8ff5@kernel.org.mbox.gz" }
lkml
[PATCH -next v2 0/4] cgroup/dmem: bugfixes
From: Chen Ridong <chenridong@huawei.com> This patch series addresses three existing bugs in the cgroup/dmem subsystem and adds a safety check for an exported API to prevent misuse. --- v2: - patch 1/4: fix uninitialized region. - patch 4/4: new patch adding check for exported API. Chen Ridong (4): cgroup/dmem: ...
Applied 1-3 to cgroup/for-6.19-fixes w/ stable tags added. I dropped 4/4 as we don't want this kind of blanket input validation unless there are specific reasons to do so. Thanks. -- tejun
{ "author": "Tejun Heo <tj@kernel.org>", "date": "Mon, 02 Feb 2026 06:17:40 -1000", "thread_id": "a3f6882172c7a1d1e335259675cc8ff5@kernel.org.mbox.gz" }
lkml
[PATCH v3] docs: ja_JP: process: translate 'Obtain a current source tree'
Translate the "Obtain a current source tree" section in Documentation/translations/ja_JP/process/submitting-patches.rst. Signed-off-by: Akiyoshi Kurita <weibu@redadmin.org> --- .../ja_JP/process/submitting-patches.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/translat...
On Tue, 27 Jan 2026 22:01:55 +0900, Akiyoshi Kurita wrote: I failed to catch this in v2, but, I think you wanted to say: Translate the "Obtain a current source tree" section in Documentation/process/submitting-patches.rst. , no? That said, I don't think this nit-pick is worth a respin. So, Reviewed-by: Aki...
{ "author": "Akira Yokosawa <akiyks@gmail.com>", "date": "Wed, 28 Jan 2026 16:43:10 +0900", "thread_id": "87fr7jrsna.fsf@trenco.lwn.net.mbox.gz" }
lkml
[PATCH v3] docs: ja_JP: process: translate 'Obtain a current source tree'
Translate the "Obtain a current source tree" section in Documentation/translations/ja_JP/process/submitting-patches.rst. Signed-off-by: Akiyoshi Kurita <weibu@redadmin.org> --- .../ja_JP/process/submitting-patches.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/translat...
Akiyoshi Kurita <weibu@redadmin.org> writes: Applied, thanks. And Akira, thanks for reviewing these - I do appreciate it. jon
{ "author": "Jonathan Corbet <corbet@lwn.net>", "date": "Mon, 02 Feb 2026 09:56:25 -0700", "thread_id": "87fr7jrsna.fsf@trenco.lwn.net.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
Move struct bpf_struct_ops_link's definition into bpf.h, where other custom bpf links definitions are. It's necessary to access its members from outside of generic bpf_struct_ops implementation, which will be done by following patches in the series. Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev> --- includ...
{ "author": "Roman Gushchin <roman.gushchin@linux.dev>", "date": "Mon, 26 Jan 2026 18:44:04 -0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
Introduce an ability to attach bpf struct_ops'es to cgroups. a user passes a BPF_F_CGROUP_FD flag and specifies the target cgroup fd while creating a struct_ops link. As the result, the bpf struct_ops link will be created and attached to a cgroup. The cgroup.bpf structure maintains a list of attached struct ops links...
{ "author": "Roman Gushchin <roman.gushchin@linux.dev>", "date": "Mon, 26 Jan 2026 18:44:05 -0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
bpf_map__attach_struct_ops() returns -EINVAL instead of -ENOMEM on the memory allocation failure. Fix it. Fixes: 590a00888250 ("bpf: libbpf: Add STRUCT_OPS support") Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev> --- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/...
{ "author": "Roman Gushchin <roman.gushchin@linux.dev>", "date": "Mon, 26 Jan 2026 18:44:06 -0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
Introduce bpf_map__attach_struct_ops_opts(), an extended version of bpf_map__attach_struct_ops(), which takes additional struct bpf_struct_ops_opts argument. This allows to pass a target_fd argument and the BPF_F_CGROUP_FD flag and attach the struct ops to a cgroup as a result. Signed-off-by: Roman Gushchin <roman.gu...
{ "author": "Roman Gushchin <roman.gushchin@linux.dev>", "date": "Mon, 26 Jan 2026 18:44:07 -0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
Struct oom_control is used to describe the OOM context. It's memcg field defines the scope of OOM: it's NULL for global OOMs and a valid memcg pointer for memcg-scoped OOMs. Teach bpf verifier to recognize it as trusted or NULL pointer. It will provide the bpf OOM handler a trusted memcg pointer, which for example is r...
{ "author": "Roman Gushchin <roman.gushchin@linux.dev>", "date": "Mon, 26 Jan 2026 18:44:08 -0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
mem_cgroup_get_from_ino() can be reused by the BPF OOM implementation, but currently depends on CONFIG_SHRINKER_DEBUG. Remove this dependency. Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev> Acked-by: Michal Hocko <mhocko@suse.com> --- include/linux/memcontrol.h | 4 ++-- mm/memcontrol.c | 2 -- 2...
{ "author": "Roman Gushchin <roman.gushchin@linux.dev>", "date": "Mon, 26 Jan 2026 18:44:09 -0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
Introduce a bpf struct ops for implementing custom OOM handling policies. It's possible to load one bpf_oom_ops for the system and one bpf_oom_ops for every memory cgroup. In case of a memcg OOM, the cgroup tree is traversed from the OOM'ing memcg up to the root and corresponding BPF OOM handlers are executed until so...
{ "author": "Roman Gushchin <roman.gushchin@linux.dev>", "date": "Mon, 26 Jan 2026 18:44:10 -0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
Introduce bpf_oom_kill_process() bpf kfunc, which is supposed to be used by BPF OOM programs. It allows to kill a process in exactly the same way the OOM killer does: using the OOM reaper, bumping corresponding memcg and global statistics, respecting memory.oom.group etc. On success, it sets the oom_control's bpf_memo...
{ "author": "Roman Gushchin <roman.gushchin@linux.dev>", "date": "Mon, 26 Jan 2026 18:44:11 -0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
Introduce bpf_out_of_memory() bpf kfunc, which allows to declare an out of memory events and trigger the corresponding kernel OOM handling mechanism. It takes a trusted memcg pointer (or NULL for system-wide OOMs) as an argument, as well as the page order. If the BPF_OOM_FLAGS_WAIT_ON_OOM_LOCK flag is not set, only o...
{ "author": "Roman Gushchin <roman.gushchin@linux.dev>", "date": "Mon, 26 Jan 2026 18:44:12 -0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
Export tsk_is_oom_victim() helper as a BPF kfunc. It's very useful to avoid redundant oom kills. Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev> Suggested-by: Michal Hocko <mhocko@suse.com> --- mm/oom_kill.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mm/oom_kill.c b/mm/oom_kill.c ind...
{ "author": "Roman Gushchin <roman.gushchin@linux.dev>", "date": "Mon, 26 Jan 2026 18:44:13 -0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
Implement read_cgroup_file() helper to read from cgroup control files, e.g. statistics. Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev> --- tools/testing/selftests/bpf/cgroup_helpers.c | 45 ++++++++++++++++++++ tools/testing/selftests/bpf/cgroup_helpers.h | 3 ++ 2 files changed, 48 insertions(+) diff --g...
{ "author": "Roman Gushchin <roman.gushchin@linux.dev>", "date": "Mon, 26 Jan 2026 18:44:14 -0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
Implement a kselftest for the OOM handling functionality. The OOM handling policy which is implemented in BPF is to kill all tasks belonging to the biggest leaf cgroup, which doesn't contain unkillable tasks (tasks with oom_score_adj set to -1000). Pagecache size is excluded from the accounting. The test creates a hi...
{ "author": "Roman Gushchin <roman.gushchin@linux.dev>", "date": "Mon, 26 Jan 2026 18:44:15 -0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
Add a trace point to psi_avgs_work(). It can be used to attach a bpf handler which can monitor PSI values system-wide or for specific cgroup(s) and potentially perform some actions, e.g. declare an OOM. Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev> --- include/trace/events/psi.h | 27 +++++++++++++++++++++...
{ "author": "Roman Gushchin <roman.gushchin@linux.dev>", "date": "Mon, 26 Jan 2026 18:44:16 -0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
To allow a more efficient filtering of cgroups in the psi work tracepoint handler, let's add a u64 cgroup_id field to the psi_group structure. For system PSI, 0 will be used. Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev> --- include/linux/psi_types.h | 4 ++++ kernel/sched/psi.c | 1 + 2 files chang...
{ "author": "Roman Gushchin <roman.gushchin@linux.dev>", "date": "Mon, 26 Jan 2026 18:44:17 -0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
Allow calling bpf_out_of_memory() from a PSI tracepoint to enable PSI-based OOM killer policies. Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev> --- mm/oom_kill.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 53f9f9674658..276cf8a34449 10064...
{ "author": "Roman Gushchin <roman.gushchin@linux.dev>", "date": "Mon, 26 Jan 2026 18:44:18 -0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
[ ... ] ^^^^^^^^^^^^^^^^^^^^^^^^ This isn't a bug, but should this say "Buffer to store data read from the file" or "Buffer to read into"? The current wording suggests data is read from the buffer, but the code reads from the file into the buffer. Compare with write_cgroup_file() which says "Buffer to write...
{ "author": "bot+bpf-ci@kernel.org", "date": "Tue, 27 Jan 2026 03:08:46 +0000 (UTC)", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
[ ... ] Can this code access st_link after it has been freed? Once st_link->cgroup is set to NULL, if another CPU concurrently closes the link FD, bpf_struct_ops_map_link_dealloc() will see st_link->cgroup as NULL, skip the cgroup_bpf_detach_struct_ops() call, and proceed to kfree(st_link). Then the bpf_link_inc_not...
{ "author": "bot+bpf-ci@kernel.org", "date": "Tue, 27 Jan 2026 03:08:48 +0000 (UTC)", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
[ ... ] The code reads flags and target_fd from opts, but the expected_revision field declared in struct bpf_struct_ops_opts is never read. Looking at similar opts structures (bpf_cgroup_opts, bpf_tcx_opts, bpf_netkit_opts), they all pass expected_revision to bpf_link_create_opts. For example: link_create_opts.c...
{ "author": "bot+bpf-ci@kernel.org", "date": "Tue, 27 Jan 2026 03:08:49 +0000 (UTC)", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
On Tue, Jan 27, 2026 at 10:47 AM Roman Gushchin <roman.gushchin@linux.dev> wrote: Since both fdinfo and link_info show the cgroup ID, why not use BPF_F_CGROUP_ID for better alignment? We may need to support other structs in the future. Could we implement a more generic solution, such as: int type; // cg...
{ "author": "Yafang Shao <laoar.shao@gmail.com>", "date": "Tue, 27 Jan 2026 13:49:18 +0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
On Tue, Jan 27, 2026 at 10:46 AM Roman Gushchin <roman.gushchin@linux.dev> wrote: Feel free to add: Acked-by: Yafang Shao <laoar.shao@gmail.com> -- Regards Yafang
{ "author": "Yafang Shao <laoar.shao@gmail.com>", "date": "Tue, 27 Jan 2026 13:50:31 +0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
On Tue, Jan 27, 2026 at 10:53 AM Roman Gushchin <roman.gushchin@linux.dev> wrote: Acked-by: Yafang Shao <laoar.shao@gmail.com> -- Regards Yafang
{ "author": "Yafang Shao <laoar.shao@gmail.com>", "date": "Tue, 27 Jan 2026 13:52:41 +0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
On Tue, Jan 27, 2026 at 10:49 AM Roman Gushchin <roman.gushchin@linux.dev> wrote: Acked-by: Yafang Shao <laoar.shao@gmail.com> -- Regards Yafang
{ "author": "Yafang Shao <laoar.shao@gmail.com>", "date": "Tue, 27 Jan 2026 14:06:20 +0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
On Tue, Jan 27, 2026 at 10:49 AM Roman Gushchin <roman.gushchin@linux.dev> wrote: Given that mem_cgroup_ino() pairs with mem_cgroup_get_from_ino(), should we also define mem_cgroup_ino() outside CONFIG_SHRINKER_DEBUG? -- Regards Yafang
{ "author": "Yafang Shao <laoar.shao@gmail.com>", "date": "Tue, 27 Jan 2026 14:12:17 +0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
On Mon 26-01-26 18:44:03, Roman Gushchin wrote: Are you planning to write any highlevel documentation on how to use the existing infrastructure to implement proper/correct OOM handlers with these generic interfaces? -- Michal Hocko SUSE Labs
{ "author": "Michal Hocko <mhocko@suse.com>", "date": "Tue, 27 Jan 2026 10:02:38 +0100", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
On Mon 26-01-26 18:44:10, Roman Gushchin wrote: I still find this dual reporting a bit confusing. I can see your intention in having a pre-defined "releasers" of the memory to trust BPF handlers more but they do have access to oc->bpf_memory_freed so they can manipulate it. Therefore an additional level of protection ...
{ "author": "Michal Hocko <mhocko@suse.com>", "date": "Tue, 27 Jan 2026 10:38:42 +0100", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
On 1/26/26 6:44 PM, Roman Gushchin wrote: The filter callback is registered for BPF_PROG_TYPE_STRUCT_OPS. It is checking if a kfunc_id is allowed for other struct_ops progs also, e.g. the bpf-tcp-cc struct_ops progs. The 'return -EACCES' should be the cause of the "calling kernel function XXX is not allowed" err...
{ "author": "Martin KaFai Lau <martin.lau@linux.dev>", "date": "Tue, 27 Jan 2026 12:21:03 -0800", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
Martin KaFai Lau <martin.lau@linux.dev> writes: Oh, I see.. It's a bit surprising that these .filter() functions have non-local effects... Will fix in v4. Thank you, Martin!
{ "author": "Roman Gushchin <roman.gushchin@linux.dev>", "date": "Tue, 27 Jan 2026 20:47:11 +0000", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
Michal Hocko <mhocko@suse.com> writes: What do you expect from such a document, can you, please, elaborate? I'm asking because the main promise of bpf is to provide some sort of a safe playground, so anyone can experiment with writing their bpf implementations (like sched_ext schedulers or bpf oom policies) with mini...
{ "author": "Roman Gushchin <roman.gushchin@linux.dev>", "date": "Tue, 27 Jan 2026 21:01:48 +0000", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }
lkml
[PATCH bpf-next v3 00/17] mm: BPF OOM
This patchset adds an ability to customize the out of memory handling using bpf. It focuses on two parts: 1) OOM handling policy, 2) PSI-based OOM invocation. The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal [1], which augmented the existing task ranking policy, this o...
Michal Hocko <mhocko@suse.com> writes: No, they can't. They have only a read-only access. It's a good question, I see your point... Basically we want to give a handler an option to exit with "I promise, some memory will be freed soon" without doing anything destructive. But keeping it save at the same time. I don'...
{ "author": "Roman Gushchin <roman.gushchin@linux.dev>", "date": "Tue, 27 Jan 2026 21:12:56 +0000", "thread_id": "CAADnVQL5g8imKNGbHGQ4HA8_qNT4MYwM8P3aCTFUG7uwiuTeuw@mail.gmail.com.mbox.gz" }