From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1B861D555 for ; Mon, 16 Sep 2024 13:02:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726491739; cv=none; b=ds1uKJnlk/wkdUGZ9n3PxqA+Gujv709nXIydKDYCTi5m9DEbhZXtp9qhk8VtWVjRfZAi3+Mx+KpHOAbP0n2jg78Vgd14TyaxiuXPZbvPULnQJXjKkuHJFnrwOBFZgpzUD8UR1otjZ2HRhkyBAUcCEWrbeZUVctDt/CKsgkhpKJI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726491739; c=relaxed/simple; bh=FQtOdAadtJgxB15TMtnZ1MxtNBTYTLRHpvSphzowYPA=; h=Date:From:To:CC:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:References; b=UWwEcbrpUi8w5usTOfb+O4L20G/t1lC3+uQYtS0d+wSXWobK256kIyH5lV88Yc6r5233EWyfsL+X1HuR4EiFRrOUpfaIpWhZL/aQVVUvKcQba65mm+c76IBsuPNDg4rUsYo0K7BB50gLlrH0YA6sqU03TnAjqwuLt0dh70CtkzI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=cieuSILB; arc=none smtp.client-ip=210.118.77.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="cieuSILB" Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20240916130214euoutp0156bfb90cbc7997822c4e1f62368dec1d~1uxXdL9uJ0517205172euoutp01F for ; Mon, 16 Sep 2024 13:02:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20240916130214euoutp0156bfb90cbc7997822c4e1f62368dec1d~1uxXdL9uJ0517205172euoutp01F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1726491734; bh=Oh5AZ/A0I1IDwcZK/pV36EkdX2y9NmYlY6RctXXQcnE=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=cieuSILBmmCaGMH6JIDeeWjDpYQgVsuBJfjZBJUixBn5XLEjk7Oq+Ftt1v/Sg8ex2 xbi00lZIqhgBZXiqSH8J1tbyulXvDD86RMGhODWUrpb0g4rXQHMV/npX/mCScWw27e gzZFn07aRAnwLAEYz4lRKtog0JE63r+Jv+FBc8/4= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20240916130214eucas1p1a342e3ed5fecdeb5519555a2400d0b5d~1uxXMjCGT1987919879eucas1p1H; Mon, 16 Sep 2024 13:02:14 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id EA.52.09875.65C28E66; Mon, 16 Sep 2024 14:02:14 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20240916130213eucas1p14bcfea10fff9a689e138a576d94e1560~1uxWrmGVj2332223322eucas1p17; Mon, 16 Sep 2024 13:02:13 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240916130213eusmtrp19d08b0ff4cba97e7132c5e5c709bda8b~1uxWqnxco0912309123eusmtrp14; Mon, 16 Sep 2024 13:02:13 +0000 (GMT) X-AuditID: cbfec7f4-9acd8a8000002693-1c-66e82c567579 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id E7.9E.19096.55C28E66; Mon, 16 Sep 2024 14:02:13 +0100 (BST) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240916130213eusmtip274db698c54c972a1986f16d67d3c778f~1uxWcv1ip2259722597eusmtip2a; Mon, 16 Sep 2024 13:02:13 +0000 (GMT) Received: from localhost (106.110.32.44) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 16 Sep 2024 14:02:13 +0100 Date: Mon, 16 Sep 2024 15:02:08 +0200 From: Joel Granados To: Jason Gunthorpe CC: Baolu Lu , "Tian, Kevin" , David Woodhouse , Joerg Roedel , Will Deacon , Robin Murphy , Klaus Jensen , "linux-kernel@vger.kernel.org" , "iommu@lists.linux.dev" Subject: Re: [PATCH v2 1/5] iommu/vt-d: Separate page request queue from SVM Message-ID: <20240916130208.g7a7isdby6ujpykh@joelS2.panther.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240915134928.GD869260@ziepe.ca> X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBKsWRmVeSWpSXmKPExsWy7djP87phOi/SDNqXiVtsnriVzWLiysnM Fr++WFjsP/iN1WLmjBOMFp2zN7BbLH27ld3i8q45bBY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lZ7JZbijERDLeai4kQAvGkvk2cDAAA= X-CMS-MailID: 20240916130213eucas1p14bcfea10fff9a689e138a576d94e1560 X-Msg-Generator: CA X-RootMTR: 20240915134935eucas1p264b4d0955ac93f2192dd29cef7a573aa X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240915134935eucas1p264b4d0955ac93f2192dd29cef7a573aa References: <20240913-jag-iopfv8-v2-0-dea01c2343bc@samsung.com> <20240913-jag-iopfv8-v2-1-dea01c2343bc@samsung.com> <20240915134928.GD869260@ziepe.ca> On Sun, Sep 15, 2024 at 10:49:28AM -0300, Jason Gunthorpe wrote: > On Sat, Sep 14, 2024 at 01:49:44PM +0800, Baolu Lu wrote: > > On 2024/9/14 10:53, Tian, Kevin wrote: > > > > From: Baolu Lu > > > > Sent: Saturday, September 14, 2024 9:18 AM > > > > > > > > On 9/14/24 8:52 AM, Tian, Kevin wrote: > > > > > > From: Joel Granados via B4 Relay > > > > > > > > > > > > > > > > > > From: Joel Granados > > > > > > > > > > > > IO page faults are no longer dependent on CONFIG_INTEL_IOMMU_SVM. > > > > > > Move > > > > > > all Page Request Queue (PRQ) functions that handle prq events to a new > > > > > > file in drivers/iommu/intel/prq.c. The page_req_des struct is now > > > > > > declared in drivers/iommu/intel/prq.c. > > > > > > > > > > > > No functional changes are intended. This is a preparation patch to > > > > > > enable the use of IO page faults outside the SVM/PASID use cases. > > > > > Do we want to guard it under a new config option e.g. > > > > > CONFIG_INTEL_IOMMU_IOPF? it's unnecessary to allocate resources > > > > > for the majority usages which don't require IOPF. > > > > > > > > > > Baolu? > > > > The OS builder doesn't know if Linux will run on a platform with PRI- > > > > capable devices. They'll probably always enable this option if we > > > > provide it. > > > hmm then why do we need a SVM option? In reality I haven't seen > > > a platform which supports IOPF but no pasid/SVM. so the reason > > > for whether to have an option should be same between IOPF/SVM. > > > > > > IMHO the point of options is to allow reducing footprint of the kernel > > > image and many options are probably always enabled in distributions... > > > > To be honest, I would hope to remove the SVM option some day. It's > > nothing special except listening to an external notification and > > synchronize the caches when the page table is updated. It's common to > > all cases where a page table is shared between the IOMMU and another > > component. > > > > As for CONFIG_INTEL_IOMMU_IOPF, my suggestion is that we don't need to > > add any unnecessary options unless we see a real need. > > You could possibly bundle the SVA and IOPF options together > > I called the new option on the ARM side CONFIG_ARM_SMMU_V3_IOMMUFD > which seems like a reasonable cut point against embedded vs server. I'll go with Baolu's suggestion of leaving as is for my V3. Thx for the review -- Joel Granados