Re: [BUG] seltests/iommu: runaway ./iommufd consuming 99% CPU after a failed assert()

2024-03-28 Thread Joao Martins
On 27/03/2024 20:04, Mirsad Todorovac wrote: > On 3/27/24 11:41, Joao Martins wrote: >> On 25/03/2024 13:52, Jason Gunthorpe wrote: >>> On Mon, Mar 25, 2024 at 12:17:28PM +, Joao Martins wrote: >>>>> However, I am not smart enough to figure out why ... >&g

Re: [PATCH] selftests: iommu: add config needed for iommufd_fail_nth

2024-03-27 Thread Joao Martins
On 27/03/2024 18:20, Jason Gunthorpe wrote: > On Wed, Mar 27, 2024 at 06:09:37PM +0000, Joao Martins wrote: >> On 27/03/2024 17:49, Muhammad Usama Anjum wrote: >>> On 3/27/24 7:59 PM, Joao Martins wrote: >>>> On 27/03/2024 11:49, Jason Gunthorpe wrote: >>&g

Re: [PATCH] selftests: iommu: add config needed for iommufd_fail_nth

2024-03-27 Thread Joao Martins
On 27/03/2024 18:17, Muhammad Usama Anjum wrote: > On 3/27/24 11:09 PM, Joao Martins wrote: >> On 27/03/2024 17:49, Muhammad Usama Anjum wrote: >>> On 3/27/24 7:59 PM, Joao Martins wrote: >>>> On 27/03/2024 11:49, Jason Gunthorpe wrote: >>>>> On We

Re: [PATCH] selftests: iommu: add config needed for iommufd_fail_nth

2024-03-27 Thread Joao Martins
On 27/03/2024 17:49, Muhammad Usama Anjum wrote: > On 3/27/24 7:59 PM, Joao Martins wrote: >> On 27/03/2024 11:49, Jason Gunthorpe wrote: >>> On Wed, Mar 27, 2024 at 03:14:25PM +0500, Muhammad Usama Anjum wrote: >>>> On 3/26/24 8:03 PM, Jason Gunthorpe wrote: >&

Re: [BUG] seltests/iommu: runaway ./iommufd consuming 99% CPU after a failed assert()

2024-03-27 Thread Joao Martins
On 27/03/2024 11:40, Jason Gunthorpe wrote: > On Wed, Mar 27, 2024 at 10:41:52AM +0000, Joao Martins wrote: >> On 25/03/2024 13:52, Jason Gunthorpe wrote: >>> On Mon, Mar 25, 2024 at 12:17:28PM +, Joao Martins wrote: >>>>> However, I am n

Re: [PATCH] selftests: iommu: add config needed for iommufd_fail_nth

2024-03-27 Thread Joao Martins
On 27/03/2024 11:49, Jason Gunthorpe wrote: > On Wed, Mar 27, 2024 at 03:14:25PM +0500, Muhammad Usama Anjum wrote: >> On 3/26/24 8:03 PM, Jason Gunthorpe wrote: >>> On Tue, Mar 26, 2024 at 06:09:34PM +0500, Muhammad Usama Anjum wrote: Even after applying this config patch and following snippe

Re: [BUG] seltests/iommu: runaway ./iommufd consuming 99% CPU after a failed assert()

2024-03-27 Thread Joao Martins
On 25/03/2024 13:52, Jason Gunthorpe wrote: > On Mon, Mar 25, 2024 at 12:17:28PM +0000, Joao Martins wrote: >>> However, I am not smart enough to figure out why ... >>> >>> Apparently, from the source, mmap() fails to allocate pages on the desired >>>

Re: [BUG] seltests/iommu: runaway ./iommufd consuming 99% CPU after a failed assert()

2024-03-25 Thread Joao Martins
On 23/03/2024 20:13, Mirsad Todorovac wrote: > > > On 3/19/24 14:58, Jason Gunthorpe wrote: >> On Tue, Mar 12, 2024 at 07:35:40AM +0100, Mirsad Todorovac wrote: >>> Hi, >>> >>> (This is verified on the second test box.) >>> >>> In the most recent 6.8.0 release of torvalds tree kernel with selftes

Re: [PATCH] iommu/vt-d: Set SSADE when attaching to a parent with dirty tracking

2024-02-09 Thread Joao Martins
On 08/02/2024 10:31, Joao Martins wrote: > On 08/02/2024 09:14, Yi Liu wrote: >> Should set the SSADE (Second Stage Access/Dirty bit Enable) bit of the >> pasid entry when attaching a device to a nested domain if its parent >> has already enabled dirty tracking. >> >

Re: [PATCH] iommu/vt-d: Set SSADE when attaching to a parent with dirty tracking

2024-02-09 Thread Joao Martins
On 09/02/2024 02:40, Baolu Lu wrote: > On 2024/2/8 17:14, Yi Liu wrote: >> Should set the SSADE (Second Stage Access/Dirty bit Enable) bit of the >> pasid entry when attaching a device to a nested domain if its parent >> has already enabled dirty tracking. >> >> Fixes: 111bf85c68f6 ("iommu/vt-d: Ad

Re: [PATCH] iommu/vt-d: Set SSADE when attaching to a parent with dirty tracking

2024-02-08 Thread Joao Martins
o setup pasid nested > translation") > Signed-off-by: Yi Liu Reviewed-by: Joao Martins > --- > base commit: 547ab8fc4cb04a1a6b34377dd8fad34cd2c8a8e3 > --- > drivers/iommu/intel/pasid.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/iommu/intel/pasid.

Re: [PATCH rc 7/8] iommu/vt-d: Wrap the dirty tracking loop to be a helper

2024-02-08 Thread Joao Martins
On 08/02/2024 08:23, Yi Liu wrote: > Add device_set_dirty_tracking() to loop all the devices and set the dirty > tracking per the @enable parameter. > > Signed-off-by: Yi Liu Nice cleanup, Reviewed-by: Joao Martins > --- > drivers/iommu/

Re: [PATCH rc 6/8] iommu/vt-d: Remove @domain parameter from intel_pasid_setup_dirty_tracking()

2024-02-08 Thread Joao Martins
issing dirty tracking for the parent domain, > which needs to use the DID of nested domain. > > Signed-off-by: Yi Liu Reviewed-by: Joao Martins > --- > drivers/iommu/intel/iommu.c | 7 +++ > drivers/iommu/intel/pasid.c | 3 +-- > drivers/iommu/intel/pasid.h | 1 - >

Re: [syzbot] [iommu?] divide error in iommufd_test

2023-10-27 Thread Joao Martins
ot-assets/7dd355dbe055/vmlinux-e8361b00.xz > kernel image: > https://storage.googleapis.com/syzbot-assets/7b2a9050635d/bzImage-e8361b00.xz > > The issue was bisected to: > > commit 5e054083ce6929b567c6aadbf8bf627b0f028353 > Author: Joao Martins > Date: Fri Oct 20 22:28:02

Re: [PATCH v6 02/10] iommu: Pass in parent domain with user_data to domain_alloc_user op

2023-10-24 Thread Joao Martins
On 24/10/2023 16:06, Yi Liu wrote: > domain_alloc_user op already accepts user flags for domain allocation, add > a parent domain pointer and a driver specific user data support as well. > > Add a struct iommu_user_data as a bundle of data_ptr/data_len/type from an > iommufd core uAPI structure. M