Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp130055rdb; Sun, 14 Jan 2024 09:19:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IHFdiyZ5cu1Wg+K11nYda9MFFpFXIGL2v0rCbsz1g/6nEtcZEq+5lJ0WfhTX+KJOMViWnjt X-Received: by 2002:a92:cf0b:0:b0:360:637:f64d with SMTP id c11-20020a92cf0b000000b003600637f64dmr5620491ilo.6.1705252761973; Sun, 14 Jan 2024 09:19:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705252761; cv=none; d=google.com; s=arc-20160816; b=RxGN2QPhbXowNmVKyREMBYI4vHXXT6rgqqCK1u/Rr4pf+Fo36ErRx3pM+yJcJVnK2l PxKSuAJCw1LcObK+/CMlGsNU3yg4ZKtUOc6SPvZXkrz0Qpa1kIxEnbgt/4A0RDn1GC80 ufZRZp1pFmlidtckFlds3jLe4gjDI5D/jCI73bv40ksQPx7ygHMIlRYPnlFzcsTXPh/7 KOqSuyO8grpD83jWJspu6IWJ1YGHpU1f2exE9Pea2wb4BeDO0c6Gk2H95ccEx2E3F43A 4PrNQobnuJuuJujASQ/c4VvEgy+KYAH1We7784RS6BpPD4t7QBqv1QJI2LoVDS2wDzP+ KUKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:cms-type:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:message-id :subject:cc:to:from:date:dkim-signature:dkim-filter; bh=CxQHD6kq4IhKeSFG+n/gJm2tbKb9TRfYtb+C/DIiSNs=; fh=d2ktUdivnFpU1Y9znRWiF+d+U8IIAvbU4SIRMc1s5dE=; b=DBcB4yDLEJTKttztoRh+fnz78sVepzwBYLyIFukLsWvTjK3udqkGw8mZevVmVGVQkl ROqIYpkk96Feu0Enj2SbWth/hYZeXE9x6pi7doUkN7yDpUrTc+m3+LexfqcnRsmJ/CR3 yTMd+q0bk7Ck5W3jEhIzzrkIxczDw9WM3F/0Rgmgqm9YRLXy1rhc6sOqnCtbQ1dCvIqP eQLobxAgKIW2TzrYK+URE/0JzGXnolkDx2oNeVrseg6WzJM2GIDzyN+J8XVXjYw1m7+/ YzsbPp9cAQWG1qcJHwuTSiLjDHVfdzrtK8oiLBVry13EpP4d+cD3Ccw+/KUkRrk1CoUg QrbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=btSB8nXp; spf=pass (google.com: domain of linux-kernel+bounces-25518-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25518-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q18-20020a170902dad200b001d4bd23ecaesi8204646plx.439.2024.01.14.09.19.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jan 2024 09:19:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25518-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=btSB8nXp; spf=pass (google.com: domain of linux-kernel+bounces-25518-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25518-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8E63F281FC2 for ; Sun, 14 Jan 2024 17:19:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C85C6127; Sun, 14 Jan 2024 17:19:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="btSB8nXp" 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 58AFE5662; Sun, 14 Jan 2024 17:19:10 +0000 (UTC) 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 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20240114171901euoutp017d9a5e4ffe55cc9cd215872b1916844a~qRlV5XdFH0168601686euoutp01i; Sun, 14 Jan 2024 17:19:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20240114171901euoutp017d9a5e4ffe55cc9cd215872b1916844a~qRlV5XdFH0168601686euoutp01i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1705252741; bh=CxQHD6kq4IhKeSFG+n/gJm2tbKb9TRfYtb+C/DIiSNs=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=btSB8nXpNS2Cz9eh6uyUM/WAscgBiCQzKyTUtAdc9SkcquZBOQcbKGT+T+pDgXmjh G0niTvN9HI4pgqHSzt11QsVQCvW8mlUccYlub/8hFfuSFG02sIKT8PIa99T0OcSkrM CLECNTOoKRnLzPcGhknbf7mR4e1VpjHfxZwJQM6I= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20240114171900eucas1p2ef2348561683c06eefe896e091a4c552~qRlUNx69y1703217032eucas1p2T; Sun, 14 Jan 2024 17:19:00 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id C9.B8.09539.38714A56; Sun, 14 Jan 2024 17:18:59 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20240114171857eucas1p1e06b5a7617b9b6cd0dd86a428c0cca58~qRlSPyrRQ0440104401eucas1p1I; Sun, 14 Jan 2024 17:18:57 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240114171857eusmtrp2428c12f0cb9ccd2541afdefce67285e6~qRlSKg9ES2538825388eusmtrp2X; Sun, 14 Jan 2024 17:18:57 +0000 (GMT) X-AuditID: cbfec7f2-515ff70000002543-1f-65a4178309e1 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id E8.30.10702.18714A56; Sun, 14 Jan 2024 17:18:57 +0000 (GMT) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240114171857eusmtip298d2556ec3a0ec0e7944de5f5925d1bd~qRlR8saI-1434514345eusmtip2H; Sun, 14 Jan 2024 17:18:57 +0000 (GMT) Received: from localhost (106.210.248.50) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 14 Jan 2024 17:18:56 +0000 Date: Sun, 14 Jan 2024 18:18:50 +0100 From: Joel Granados To: Baolu Lu CC: Jason Gunthorpe , Kevin Tian , Joerg Roedel , Will Deacon , Robin Murphy , Jean-Philippe Brucker , Nicolin Chen , Yi Liu , Jacob Pan , , , , Subject: Re: [PATCH v2 0/6] IOMMUFD: Deliver IO page faults to user space Message-ID: <20240114171850.mwcoutrrjxn7ltlf@localhost> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="lvqsjam64aakrwcq" Content-Disposition: inline In-Reply-To: <293a5643-ef36-4a34-9b6b-0f5b47061c2e@linux.intel.com> X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphk+LIzCtJLcpLzFFi42LZduznOd1m8SWpBjeuW1hsnriVzeLXFwuL pQfXs1g0rL7AajFzxglGi87ZG9gtlr7dym5xedccNovpd96zWex9+pjN4uCHJ6wWy8/OY7No uWNqMffnNRYHPo8nB+cxeayZt4bRY/Gel0wem1Z1snncubaHzWPeyUCPyTeWM3q82DyT0aO3 +R2bx+dNch5bP99mCeCO4rJJSc3JLEst0rdL4MpY3L6TteCdTMXde08YGxiXSXQxcnJICJhI HO68wdbFyMUhJLCCUeLF/nZGCOcLo0TPrOlMEM5nRokvJ2cDORxgLY87SyHiyxklru1pZoYr 2j1pFpSzhVHi68clTCBLWARUJe42LwSz2QR0JM6/ucMMYosIqEs0Ne4FW84scIdZ4tSLe6wg CWEBT4n364+xgdi8AuYSC++1sUDYghInZz4Bs5kFKiTW/JnACHISs4C0xPJ/HCBhTgFniYNL /rFBXKok8X21F8SftRKnttwC+0ZC4BenxMY/m1kgEi4S059eYYewhSVeHd8CZctI/N85H6ph MqPE/n8f2CGc1YwSyxq/MkFUWUu0XHkC1eEosb61hQViM5/EjbeCEHfySUzaNp0ZIswr0dEm BFGtJrH63huWCYzKs5B8NgvJZ7MQPoMI60gs2P2JDUNYW2LZwtfMELatxLp171kWMLKvYhRP LS3OTU8tNsxLLdcrTswtLs1L10vOz93ECE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AMmoVk0CyEQRBhLYkb/14yYQhrSyxb+JoZwraVWLfuPcsCRvZVjCKppcW56bnFRnrFibnF pXnpesn5uZsYgalk27GfW3Ywrnz1Ue8QIxMH4yFGFaDORxtWX2CUYsnLz0tVEuE9+HxBqhBv SmJlVWpRfnxRaU5q8SFGU2AgTmSWEk3OBya5vJJ4QzMDU0MTM0sDU0szYyVxXs+CjkQhgfTE ktTs1NSC1CKYPiYOTqkGJqVzLTd2n5vWVcSiwq11tUb9z+55E1d/tJlwI7h2OaPeszN9t1// 6l00z2DPyo/Xz6YIWKwRrzivt3P+tnl7mkLv64k86fde5Z+2ftqZso+XZxSnW3etuf50a2F9 6YlvgXw9t0zezFzA1K0uNG+v17UY/sZ53z2c+c1Ugm3+ujw7sHiXrD7fFkOfKgu5qe8vR/Ht Cc06GvK/f83xlRvWdCy+wjf158klYQurdOXnbZp9PpvjDWeI87yizzqvroZkLgvYZ/xqjtLn T4npX/1TD7rHBvnv2n/VpOLfGj3GvW8qJ8S8+3Bj2s6nvf+eV5pOirHxXB6pvOPgacnCRwZp 5k9Pb1o6dd78iTN6T5pzMvzLUGIpzkg01GIuKk4EAGs1mEi6AwAA X-CMS-MailID: 20240114171857eucas1p1e06b5a7617b9b6cd0dd86a428c0cca58 X-Msg-Generator: CA X-RootMTR: 20240112215609eucas1p1eedeeee8e1cca2c935b41816a50f56f6 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240112215609eucas1p1eedeeee8e1cca2c935b41816a50f56f6 References: <20231026024930.382898-1-baolu.lu@linux.intel.com> <20240112215606.36sth724y6zcj43k@localhost> <293a5643-ef36-4a34-9b6b-0f5b47061c2e@linux.intel.com> --lvqsjam64aakrwcq Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 14, 2024 at 09:13:19PM +0800, Baolu Lu wrote: > On 2024/1/13 5:56, Joel Granados wrote: > > On Thu, Oct 26, 2023 at 10:49:24AM +0800, Lu Baolu wrote: > >> Hi folks, > >> > >> This series implements the functionality of delivering IO page faults = to > >> user space through the IOMMUFD framework for nested translation. Nested > >> translation is a hardware feature that supports two-stage translation > >> tables for IOMMU. The second-stage translation table is managed by the > >> host VMM, while the first-stage translation table is owned by user > >> space. This allows user space to control the IOMMU mappings for its > >> devices. > >> > >> When an IO page fault occurs on the first-stage translation table, the > >> IOMMU hardware can deliver the page fault to user space through the > >> IOMMUFD framework. User space can then handle the page fault and respo= nd > >> to the device top-down through the IOMMUFD. This allows user space to > >> implement its own IO page fault handling policies. > >> > >> User space indicates its capability of handling IO page faults by > >> setting the IOMMU_HWPT_ALLOC_IOPF_CAPABLE flag when allocating a > >> hardware page table (HWPT). IOMMUFD will then set up its infrastructure > >> for page fault delivery. On a successful return of HWPT allocation, the > >> user can retrieve and respond to page faults by reading and writing to > >> the file descriptor (FD) returned in out_fault_fd. > >> > >> The iommu selftest framework has been updated to test the IO page fault > >> delivery and response functionality. > >> > >> This series is based on the latest implementation of nested translation > >> under discussion [1] and the page fault handling framework refactoring= in > >> the IOMMU core [2]. > >> > >> The series and related patches are available on GitHub: [3] > >> > >> [1]https://lore.kernel.org/linux-iommu/20230921075138.124099-1-yi.l.li= u@intel.com/ > >> [2]https://lore.kernel.org/linux-iommu/20230928042734.16134-1-baolu.lu= @linux.intel.com/ > >> [3]https://github.com/LuBaolu/intel-iommu/commits/iommufd-io-pgfault-d= elivery-v2 > > I was working with this branch that included Yi Liu's > > wip/iommufd_nesting branch. Now Yi Lui has updated his work in this post > > https://lore.kernel.org/all/20240102143834.146165-1-yi.l.liu@intel.com. > > Is there an updated version of the page fault work that is rebased on > > top of Liu's new version? >=20 > Yes. I am preparing the new version and will post it for discussion > after the merge window. Great to hear and thx for getting back to me. I'll be on the look out for your post. Would it be possible for you to add me to the CC when you send it? Best=20 --=20 Joel Granados --lvqsjam64aakrwcq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmWkF2wACgkQupfNUreW QU/8DAv/XjOpddXnxLaH/ajB3WuoooJbtvmnUPTQFip95w/2SKTHlurGepMXVP1C NTts5to0LjiSqKtbdFkZo6owdwXw//l9B24FfTS60cvn2Xs80I3wss6+5bmZq2jS Gz6hjgJnRyrAeMKwqcqiRhlyQ+uoPPBYYYrdc31Vx3fKvhaHvCwL9x2haKCg74Hw L5bySmh8QELn5k/Dy7XgKgIY+xC0/yEICQ3/LgNS7UZhqXqyzLQJodhRB+KKl/rb Uk7cSMRTVDTJEMrkG0CQgZIGuZukOOAKAxY14qa8AMa1ug80NoGJrctZhODX2d66 p3agnVoLNT7K27FRsQZys73a+Jfr3+xkN75GcjO+dqErP2At722pl6B+vRwQFm7/ x3GBThKDo4X73DQikpx8H4bR5T2Qi8f7YRtExdaf6PY3zzY0STkiPz4J6GDFvN1j CNad9jk2xKhsDO8QnrllsWDV5DBO0Wb1IyIzfXxO7hqDmsUv0mZnrTIw7m0EcABG hqZ1vl1L =xlP1 -----END PGP SIGNATURE----- --lvqsjam64aakrwcq--