Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp139270rdb; Thu, 8 Feb 2024 01:12:02 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWKLksL8+2f4qkWlppGbEIyZClWDZ9YHrcv7VTvKB7um/QjQA+8CXHT6uTR9F1IvuC1MKa2OOnWpMGq19udcn7LjRe1e00NUH+tFC3R6w== X-Google-Smtp-Source: AGHT+IG73oGThMJwTgMPoa9q6BRN2OvVpSdm24fZsAmlL7TP+Ui+cWMAuw52rIwFlurb25EptuEi X-Received: by 2002:a17:902:c115:b0:1d8:fc65:b601 with SMTP id 21-20020a170902c11500b001d8fc65b601mr7059026pli.38.1707383522153; Thu, 08 Feb 2024 01:12:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707383522; cv=pass; d=google.com; s=arc-20160816; b=Fo7k+b8AaVE8eEuQMIbTYLAXPqawQU+Og/4657KGNQMSMEVz2Fhwtf9iq3IJ21AXW9 AhRHjS7Q2OY7WzPZogL6vLuC8oMyVeltRIJBzOkPf+7JhMaiCEVUYKalAFjcsy4XXkCm gHDxNcjTJVOwUxgk7rzCTouRf/OXdjGrapbRTU/RG5A/zZPglZU24I687NUSutoHElAm v2KooS5vKaNMrNNeZq7hqvJJPCVLwhHZkBPBBdO4dyPZta5c1WNW3cCIbQCya8YO6Ucq bOeMrD4GTb1gCe0RV6yWft5+ELmt/eX+DgrfQ957+yYwQaW2AaqVOxXSL0NQK6rYxC5C qReg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=o6hMNIZUaBRVM7gi8uDMiowpTMxtF27cC2fdkjBJWH8=; fh=8Jzjp6V2zHHUPhb7NYg/l4wkUAR9m718txCWw4ziQcw=; b=sJlhz1juwa15bU544WJjLiIr/Mo4XqRrxQmV6t1RWwR2AZ4YAeo6YI3CwEGTpyVngM iyTG4Cst+RZlH9rPw59SZpyKnY0DhYAPOppEl/6yYfay9xhCT+9wqSyoreVNzRp4luGq qzPWCsUPHi1Mwyh0YPQZstSXlza3OzHiJxAIhIixf5YB25UQMeZ3i3NK5yZf4Vq+O7/M 7de2kJVz/ZDOIAY/5X4OK2df98MfRKZ+0GnBUTJQncvLjAQvp/GP3+sCiYMAJIMyIo4Z lbx/2RgNvDxNkaQGWDNGX56tLjzsaFEmmBacEs37PHQkuz5T1txTmwYyYHYEEvAmyhfU kvcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n59bghUE; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-57699-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57699-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=2; AJvYcCV06grOMYvZEk2lv6a//xhti6b8LtVeD0i7CMR3gTkHRU2vuc2BKMPgr0dvqS/a+0VRV+FnoCNAfwXWTgJZAACPI2RMF5KHyNowwQ/YZA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z4-20020a170903408400b001d8f7d2a3fbsi3195795plc.635.2024.02.08.01.12.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 01:12:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57699-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n59bghUE; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-57699-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57699-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 CA501283AD0 for ; Thu, 8 Feb 2024 09:12:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 311216BFAC; Thu, 8 Feb 2024 09:11:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="n59bghUE" Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5893B6BB36 for ; Thu, 8 Feb 2024 09:11:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707383479; cv=none; b=STrRH4lDMBbhpd567Kb4OEutZSssX8VuyqIoMdPnNZOvI4601MG70qeY11nDd5IRP6hwe3zb4ZDqQtIwZiHGLX7HXE+3mwlGiY5DTpputO1QYbMg/yfhc73Xe/+8qjX3FxkHunRrmY7BSbhZh59SHyrntr8FzbHnnGLzqIBb1+w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707383479; c=relaxed/simple; bh=p7M5LRY2IIR3JbhYpi12gul04UVDehtCNBndvFQhT4s=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=EQ3L9V2W938+hlCW39cYraDDIaHUr+Z0O9RvrQkrucmUg2AtDaczWLLaca0MD11BQ1f1oEGxhevFPheDR24ekcu/5hQp/4xxbUs13vZHaO7IUEfz5Dq8D+B7aXOIHJHJsvXptGbaPxdE1OdlT+cotzYpgtal6egZUAlFg6zSkfI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=n59bghUE; arc=none smtp.client-ip=209.85.167.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-51171c9f4c0so105696e87.3 for ; Thu, 08 Feb 2024 01:11:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707383475; x=1707988275; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=o6hMNIZUaBRVM7gi8uDMiowpTMxtF27cC2fdkjBJWH8=; b=n59bghUEZpcupbyWHTOfn5fjBy3lHpyanCd3+vpbeNeQygNyJzf9U8bchu+ymVMBH2 ZiUZappNAzxSGHH+j1QJVV0jz8Jrw3v0dEZ45dRaIbjFO3FAU364yjybdpblnOhU/5kE PsyNirQDRDYX25xf7uABvAVnw9DroPZ2kARfGAoH8uov7LZOTafBYSzpcewav9N+fBBR fPzYrZQ+a3EzMjbFr7Rh2lpFU9jOxqXSJ1e0B8AJH3ZEfRX2WXdClLtb7PsGxFL2eFW5 9wQZpIdTG5U87HUq5uNLTjPxvQR58YV7QeekO9VOlba+GUQd40AiHTolEf+Gpd9wa/Zk kPAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707383475; x=1707988275; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=o6hMNIZUaBRVM7gi8uDMiowpTMxtF27cC2fdkjBJWH8=; b=qjNoyr3tUepP9EftJL/DfB3GkvFRf2ZDMxrYMRXlD24kNiNEWSqSZl1akYStAZ8ImO O7NCsutylKDLU9TpofAkt59wbvljkfBjWSnjR2eeuTU+cbwyGmPyM67YmnF5gqcHJlIt pMsNQayzgN0iFGZQHrY8yFDUr3fqhN89BqftkjMEvKAfSbk09OVraFo0i7VsVZDTUtco ItslGGlcnxgxJpTeHyyPbSaQPXysLR5+KbzI8LiprCR44PfKYXy6MFHj1kiPYFnRTGdS 3wAAR53afIs+5qCrt3Lm62EbcqvBng1wUNz5h9rhZDjsKkz9asEDYC+hC7lWetHH2owd oXBg== X-Forwarded-Encrypted: i=1; AJvYcCUcPDINXgBETxVY+F0xBXtc13Cqq0fznEOqtxz5BkwtbAeGUwgFEzzSWC/OavHYQEvTCbnbsZTrheB2gJ5MqwwlPSntvyj5GDI4Yd4U X-Gm-Message-State: AOJu0YxtSNizBJ5y/aDQWvmBXBVxGVwgrfhlwGyZBOVxijLrljqI/mDD aGKP1yB8LllxdMIMXvmaedWZY+zsJ15cRj2DSdrE1UUlpF/MCw4bCKzgqeQmpavKfRNM0OmMIeO XfDRK2CpMwNELilHCzcPNYeW5lF3d8dIx243smQ== X-Received: by 2002:ac2:4107:0:b0:511:6d76:4a6 with SMTP id b7-20020ac24107000000b005116d7604a6mr980330lfi.49.1707383475362; Thu, 08 Feb 2024 01:11:15 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240207013325.95182-1-baolu.lu@linux.intel.com> In-Reply-To: <20240207013325.95182-1-baolu.lu@linux.intel.com> From: Zhangfei Gao Date: Thu, 8 Feb 2024 17:11:04 +0800 Message-ID: Subject: Re: [PATCH v12 00/16] iommu: Prepare to deliver page faults to user space To: Lu Baolu Cc: Joerg Roedel , Will Deacon , Robin Murphy , Jason Gunthorpe , Kevin Tian , Jean-Philippe Brucker , Nicolin Chen , Yi Liu , Jacob Pan , Longfang Liu , Yan Zhao , Joel Granados , iommu@lists.linux.dev, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Wed, 7 Feb 2024 at 09:39, Lu Baolu wrote: > > When a user-managed page table is attached to an IOMMU, it is necessary > to deliver IO page faults to user space so that they can be handled > appropriately. One use case for this is nested translation, which is > currently being discussed in the mailing list. > > I have posted a RFC series [1] that describes the implementation of > delivering page faults to user space through IOMMUFD. This series has > received several comments on the IOMMU refactoring, which I am trying to > address in this series. > > The major refactoring includes: > > - [PATCH 01 ~ 04] Move include/uapi/linux/iommu.h to > include/linux/iommu.h. Remove the unrecoverable fault data definition. > - [PATCH 05 ~ 06] Remove iommu_[un]register_device_fault_handler(). > - [PATCH 07 ~ 10] Separate SVA and IOPF. Make IOPF a generic page fault > handling framework. > - [PATCH 11 ~ 16] Improve iopf framework. > > This is also available at github [2]. > > [1] https://lore.kernel.org/linux-iommu/20230530053724.232765-1-baolu.lu@linux.intel.com/ > [2] https://github.com/LuBaolu/intel-iommu/commits/preparatory-io-pgfault-delivery-v12 > Wandering are these patches dropped now, [PATCH v2 2/6] iommufd: Add iommu page fault uapi data https://lore.kernel.org/lkml/20231026024930.382898-3-baolu.lu@linux.intel.com/raw [PATCH v2 4/6] iommufd: Deliver fault messages to user space https://lore.kernel.org/lkml/20231026024930.382898-5-baolu.lu@linux.intel.com/ And does iouring still be used in user space? Thanks