Re: [PATCH] powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory

2025-05-09 Thread Michal Suchánek
On Wed, May 07, 2025 at 02:23:02PM +0200, Michal Suchánek wrote: > Hello, > > On Wed, May 07, 2025 at 02:36:57PM +0530, Amit Machhiwal wrote: > > Hi Michal, > > > > I can recreate this issue on sles16 distro kernel but I don't observe this > > issue > > with upstream Linux 6.15-rc5 on the **same

Re: [PATCH] powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory

2025-05-07 Thread Michal Suchánek
Hello, On Wed, May 07, 2025 at 02:36:57PM +0530, Amit Machhiwal wrote: > Hi Michal, > > I can recreate this issue on sles16 distro kernel but I don't observe this > issue > with upstream Linux 6.15-rc5 on the **same** sles16 guest. > > Note: the commit 6aa989ab2bd0 ("powerpc/pseries/iommu: memo

Re: [PATCH] powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory

2025-05-07 Thread Amit Machhiwal
Hi Michal, I can recreate this issue on sles16 distro kernel but I don't observe this issue with upstream Linux 6.15-rc5 on the **same** sles16 guest. Note: the commit 6aa989ab2bd0 ("powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory") was included since Linux 6.15-rc1. I t

Re: [PATCH] powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory

2025-03-26 Thread Gaurav Batra
Hello Michal, In the patch to fix the pmemory bug, I made some changes to the code that determines Max memory an LPAR can have (excluding pmemory). This information is needed while creating Dynamic DMA Window (DDW). These changes are in the main line code path of DDW creation. This might have

Re: [PATCH] powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory

2025-03-26 Thread Michal Suchánek
Hello, On Wed, Mar 26, 2025 at 09:46:11AM -0500, Gaurav Batra wrote: > Hello Michal, > > In the patch to fix the pmemory bug, I made some changes to the code that > determines Max memory an LPAR can have (excluding pmemory). This information > is needed while creating Dynamic DMA Window (DDW). Th

Re: [PATCH] powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory

2025-03-19 Thread Michal Suchánek
Hello, looks like this upsets some assumption qemu has about these windows. https://lists.nongnu.org/archive/html/qemu-devel/2025-03/msg05137.html When Linux kernel that has this patch applied is running inside a qemu VM with a PCI device and the VM is rebooted qemu crashes shortly after the nex

Re: [PATCH] powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory

2025-02-16 Thread Madhavan Srinivasan
On Thu, 30 Jan 2025 12:38:54 -0600, Gaurav Batra wrote: > iommu_mem_notifier() is invoked when RAM is dynamically added/removed. This > notifier call is responsible to add/remove TCEs from the Dynamic DMA Window > (DDW) when TCEs are pre-mapped. TCEs are pre-mapped only for RAM and not > for persis

Re: [PATCH] powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory

2025-02-05 Thread Donet Tom
On 2/5/25 19:28, Gaurav Batra wrote: On 2/5/25 6:43 AM, Donet Tom wrote: On 1/31/25 00:08, Gaurav Batra wrote: iommu_mem_notifier() is invoked when RAM is dynamically added/removed. This notifier call is responsible to add/remove TCEs from the Dynamic DMA Window (DDW) when TCEs are pre-map

Re: [PATCH] powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory

2025-02-05 Thread Donet Tom
On 1/31/25 00:08, Gaurav Batra wrote: iommu_mem_notifier() is invoked when RAM is dynamically added/removed. This notifier call is responsible to add/remove TCEs from the Dynamic DMA Window (DDW) when TCEs are pre-mapped. TCEs are pre-mapped only for RAM and not for persistent memory (pmemory).

Re: [PATCH] powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory

2025-02-05 Thread Gaurav Batra
On 2/5/25 6:43 AM, Donet Tom wrote: On 1/31/25 00:08, Gaurav Batra wrote: iommu_mem_notifier() is invoked when RAM is dynamically added/removed. This notifier call is responsible to add/remove TCEs from the Dynamic DMA Window (DDW) when TCEs are pre-mapped. TCEs are pre-mapped only for RAM

[PATCH] powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory

2025-01-30 Thread Gaurav Batra
iommu_mem_notifier() is invoked when RAM is dynamically added/removed. This notifier call is responsible to add/remove TCEs from the Dynamic DMA Window (DDW) when TCEs are pre-mapped. TCEs are pre-mapped only for RAM and not for persistent memory (pmemory). For DMA buffers in pmemory, TCEs are dyna