Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1478459rdb; Sun, 7 Jan 2024 23:35:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IGKR9xGpZnun8r8UO9MEcr5uzxMbT0jGFKE8SGm+Kl72fwGDIy0k+hx2Mh5bxe6RQJfjQe3 X-Received: by 2002:a50:9f82:0:b0:557:aae:f89f with SMTP id c2-20020a509f82000000b005570aaef89fmr1377638edf.38.1704699307262; Sun, 07 Jan 2024 23:35:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704699307; cv=none; d=google.com; s=arc-20160816; b=OHNxxxAspJdPYv+YlHULYZdRBccdo42IAbRRCtkbL9Tup1M8cxHiBfOCuueeDdRzh6 /vGozSCE4oxNWJ2fbrFR+Bp8DW7Ss+fL8IIm+UXsCfFiLluCpyKtCZgj3AsleFQ4JHWF JR7IRvIWJf7FOlIZDs8jusjmUIru6vUQgekzp29W3Te9YdNkTdYR/5YnbBzLJZu49p9t 97tOsAKL0rTN/NzZuEz5ok4UYNYNrPej6Gdt35A2Pew1MWP5ETkuR8PX5B9El3b4ou/R I32AITeRYIueCbUgdzOF4orSzHByrUoYIf/O4FIeJlCtReAT1OOv/ChZgFs0L6gQQl/q heEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id:dkim-signature; bh=H22OiCmXKA/Jr7ukOv8t27r8p7fZrpkasq/T1pnZ5NA=; fh=C/GjNEYLBIvsf7ANJKbj2/YOOFwkr6of3pEpXMLVtm4=; b=DOwhJhZFMlOa0kcTYUFuiPQ/a/Sb2UAQDx14py/GE6sjPiQBcZxtHKr+BswPcr1II8 KkPiAvg9L/1jSyAdXM55iBjkPatkSRpMO/5sMscwjPVTaYv8LXAGU4vOTCoBb8UkKOBC GNk2uBXQ564GKJPIwV3Zt2MZNuWPk7yXgMrjDBIO34PeByWEW3VmmM4FS1Vae77vndk3 VZlW1fyKo0E4yHvfAO2RaT+V08OLAEe2zuKW3JpyOTf/04VBNgHHTiTr4xr/UmL9C00P RpFEMNB7meM789elv0XybwB3eozRqZmv+kHQXoCp8ZecpvkeOjSju71983B+7Ei9Nqgy dp9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jqy1+qxg; spf=pass (google.com: domain of linux-kernel+bounces-19142-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19142-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f19-20020a50a6d3000000b0055451a2dc7dsi3054258edc.531.2024.01.07.23.35.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 23:35:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19142-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jqy1+qxg; spf=pass (google.com: domain of linux-kernel+bounces-19142-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19142-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id B68371F21D71 for ; Mon, 8 Jan 2024 07:35:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E0BC8F55; Mon, 8 Jan 2024 07:34:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jqy1+qxg" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) (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 62ED28BE3; Mon, 8 Jan 2024 07:34:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704699294; x=1736235294; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=H22OiCmXKA/Jr7ukOv8t27r8p7fZrpkasq/T1pnZ5NA=; b=jqy1+qxgrMy3D+HtlySvDupTvlly5b/6d/nepc6z8Dq9aGT/4F2sJMRj F6YLHQvKjpDMn8C/rm0WzHaf7Oe3GWyvlY7tdOWepnKcstn5m8odI2EnZ tNOikv2CLc4IJS51H+oCXhFUMWkWME9GhqnhwDtTU89yOptE20nOnwmjg pquK5auh2upcWJw1B1UXjgGvy1+hD1gP3be4UNTPlVj3ucftvTR90arwz 66ECgTX+0e9yyOiPfjtJea9nOETU9SxVJa1MdPgPUviFKaaUFVbGH9SVQ 5kL5yaNeFxKabBKdqwvzxBfAh1ya53/TA9MqNw76HyTMfmxWaqNE9XbKv Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10946"; a="464214776" X-IronPort-AV: E=Sophos;i="6.04,340,1695711600"; d="scan'208";a="464214776" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2024 23:33:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,340,1695711600"; d="scan'208";a="15838089" Received: from binbinwu-mobl.ccr.corp.intel.com (HELO [10.238.2.99]) ([10.238.2.99]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2024 23:32:58 -0800 Message-ID: <632616b2-ab84-4d2d-bef2-4b564322f78f@linux.intel.com> Date: Mon, 8 Jan 2024 15:32:55 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 1/6] iommu: Add cache_invalidate_user op To: Yi Liu Cc: joro@8bytes.org, alex.williamson@redhat.com, jgg@nvidia.com, kevin.tian@intel.com, robin.murphy@arm.com, baolu.lu@linux.intel.com, cohuck@redhat.com, eric.auger@redhat.com, nicolinc@nvidia.com, kvm@vger.kernel.org, mjrosato@linux.ibm.com, chao.p.peng@linux.intel.com, yi.y.sun@linux.intel.com, peterx@redhat.com, jasowang@redhat.com, shameerali.kolothum.thodi@huawei.com, lulu@redhat.com, suravee.suthikulpanit@amd.com, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, zhenzhong.duan@intel.com, joao.m.martins@oracle.com, xin.zeng@intel.com, yan.y.zhao@intel.com References: <20231117130717.19875-1-yi.l.liu@intel.com> <20231117130717.19875-2-yi.l.liu@intel.com> From: Binbin Wu In-Reply-To: <20231117130717.19875-2-yi.l.liu@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/17/2023 9:07 PM, Yi Liu wrote: > From: Lu Baolu > > The updates of the PTEs in the nested page table will be propagated to the > hardware caches on both IOMMU (IOTLB) and devices (DevTLB/ATC). > > Add a new domain op cache_invalidate_user for the userspace to flush the > hardware caches for a nested domain through iommufd. No wrapper for it, > as it's only supposed to be used by iommufd. Then, pass in invalidation > requests in form of a user data array conatining a number of invalidation s/conatining/containing/ > data entries. >