Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp205355lqq; Wed, 12 Jun 2024 23:57:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX0fipyFfgbmfmmiRGHi4h5VL4d2Ehe8nnCuGB0OAS8fhoqQYdfACNrO+jzNyAUHYCUARL6gC7jKcw+6DpH69ZQWrzTOyUtx8whRot6og== X-Google-Smtp-Source: AGHT+IHys3qsJUGa+q4N7hJQOFTyo4oXlVNhaoGZBlGqsSz83XYyl6TSQlI9gw2LzMdYBPIi7Pbl X-Received: by 2002:a17:902:e847:b0:1f7:ed3:65cc with SMTP id d9443c01a7336-1f83b5c8336mr45796075ad.27.1718261840402; Wed, 12 Jun 2024 23:57:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718261840; cv=pass; d=google.com; s=arc-20160816; b=WwsNw6KiEqc4/K+LiRppY6RmkRJQWUThe2VqCMzXImNWRpzKJtj8QDlmFWb7mdK7uD cSeAKL0MUJSAguTe8nnZCwr4uaF11DMx58jyOwn9EmkjN1pvhLuAafjvUGdvnQb1QodM Qgq6GzupK+qmhHvgLYVNDLFb06fzVe214Hxh1hqqSAbLlKT58FPRnEo1rwAjylQYS3Sr K/nHphKbbOOrib5VsGt9PVJ3PGIeJNBpwLq2whniCwEyppfCfyfHmwZVvt0BlIlz6GnS WYzEoogOKeT9kDO+q8Seg5aY2hlVitdQqgv97ZtayrJEnGXS3jGxrirhvmFYNIwJQWE3 MUhg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:cc:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=ECWQf5qZsDv8YDVArjF0ReXghy7qMZQCRXn46DL8jX4=; fh=bbgn4619vcplbSVjDShB3OMwMSBGWO5wzAvPJv0py+o=; b=U7tYUJ7iIydns78rEwhndfLPSLM2OYakYiz5zI2RBDse9z0BWqQhQ/ZPRlkA5o//JS RnupMiCBQrF2NbRhlkKMBvVSfTgQvQY/vqtxkB3kIBCKCIiAsB3jvVdEoTkVC4xPC1us wbnPo/k0RdFiofgb8i3muP19sWkdfsK4B3xWaXKHguAeme+06Ly+bXpKOiQBHqNkArjg pW2muJ3OLOrbUElin1Zerln5F+P1Ulb5flNH2s0mvQiwcrfUHQbdewjWJGhUia6aSGQv ziX9VJj87DXw7k3cX0uXbvS5f2Om4YLD9Z2vBMvsb8PAF39J/YecYdc9CDQh3DkPNFem iZmw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gLFcGBSN; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-212560-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212560-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f855ee2816si7239995ad.373.2024.06.12.23.57.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 23:57:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212560-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gLFcGBSN; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-212560-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212560-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 7B81CB2167C for ; Thu, 13 Jun 2024 04:56:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0684B13440F; Thu, 13 Jun 2024 04:56:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="gLFcGBSN" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.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 DD16913213F for ; Thu, 13 Jun 2024 04:56:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718254600; cv=none; b=eUSizenpcCcJt41anT0Ed+MMgCzbNzdy0gncA1bWZRTLaIzQ7YvrcmlS/chqkmlZLdx2I04SgEIbgNmoA7Z6sNtHaCXNno6gO5lrpxxC/Qg0dCoswuEUI84+DHcPHIS8BdJ78Qi/le39qHVrYYr6M/NozGGZqNCGQS8JsWgLYdM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718254600; c=relaxed/simple; bh=iK1p+Q+knm8MizqNtiUBP6wYZDPbo3vXshptVmdVlII=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=O0niUvXorSyz/FUtjKi0pbwvr9QIKxiEZT3bNLDOvXoPK5/TvDqsjgQTFITvzuc4AxvVlHcRcKiINclpEwzYe4agm8OEfJpyWaEORIPNC38pg5hcN/ELyYQUe0aK8dG6BhxLsH1kQLB9l4DRBFqSue4msYmgVWgUDlHZsFhiGF0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=gLFcGBSN; arc=none smtp.client-ip=192.198.163.11 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=1718254599; x=1749790599; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=iK1p+Q+knm8MizqNtiUBP6wYZDPbo3vXshptVmdVlII=; b=gLFcGBSNPUT2balpF2hCzYjfrr4c0tHj1QrZjxoeUu3rdVGxuSUpA1ro btIeiEKTYTnb2acs/PnsCkjwP9ZRpgin5ELGw2oc6RCQeWxPccarYQKIB tqL6NHL/lvOsHjzXghOtrNPqlioPclgCRPS3MRxBrJAjYI6fFhwJNyn04 7buXX99CW7lEi0Ezb+kqFumdtP5lx5ksBbVGKLpqocOjaCNKVPSqtwORK DESTNA4DClkko6TX6fWloO3NOELvcDDKw5ho9n68sTPTWLFjKYqh389h3 Hp5qgQ+6pLlMBxifZdJs1MAxMHkTDJUIa5Z6J109H9banVUkQmprKah7H A==; X-CSE-ConnectionGUID: Cgxg4cKURouVIqJhSFKtgg== X-CSE-MsgGUID: ryJaxR/YTHKnlkZ+GUUqwQ== X-IronPort-AV: E=McAfee;i="6700,10204,11101"; a="25689774" X-IronPort-AV: E=Sophos;i="6.08,234,1712646000"; d="scan'208";a="25689774" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2024 21:56:38 -0700 X-CSE-ConnectionGUID: wTJ39ElpRuCl6fhbamiwjg== X-CSE-MsgGUID: KZQcRNa9REyHMABay2tsYw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,234,1712646000"; d="scan'208";a="40652741" Received: from unknown (HELO [10.239.159.127]) ([10.239.159.127]) by orviesa008.jf.intel.com with ESMTP; 12 Jun 2024 21:56:35 -0700 Message-ID: Date: Thu, 13 Jun 2024 12:54:16 +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 Cc: baolu.lu@linux.intel.com, Joerg Roedel , Will Deacon , Robin Murphy , Jean-Philippe Brucker , Nicolin Chen , "Liu, Yi L" , Jacob Pan , Joel Granados , "iommu@lists.linux.dev" , "virtualization@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v6 05/10] iommufd: Add fault and response message definitions To: Jason Gunthorpe , "Tian, Kevin" References: <20240527040517.38561-1-baolu.lu@linux.intel.com> <20240527040517.38561-6-baolu.lu@linux.intel.com> <3ee41c29-46bb-4897-9e93-5982c43736cb@linux.intel.com> <20240612131946.GT791043@ziepe.ca> Content-Language: en-US From: Baolu Lu In-Reply-To: <20240612131946.GT791043@ziepe.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/12/24 9:19 PM, Jason Gunthorpe wrote: > On Fri, Jun 07, 2024 at 09:38:38AM +0000, Tian, Kevin wrote: >>> From: Baolu Lu >>> Sent: Thursday, June 6, 2024 2:28 PM >>> >>> On 6/5/24 4:28 PM, Tian, Kevin wrote: >>>>> From: Lu Baolu >>>>> Sent: Monday, May 27, 2024 12:05 PM >>>>> >>>>> + >>>>> +/** >>>>> + * struct iommu_hwpt_page_response - IOMMU page fault response >>>>> + * @size: sizeof(struct iommu_hwpt_page_response) >>>>> + * @flags: Must be set to 0 >>>>> + * @dev_id: device ID of target device for the response >>>>> + * @pasid: Process Address Space ID >>>>> + * @grpid: Page Request Group Index >>>>> + * @code: One of response code in enum >>> iommufd_page_response_code. >>>>> + * @cookie: The kernel-managed cookie reported in the fault message. >>>>> + */ >>>>> +struct iommu_hwpt_page_response { >>>>> + __u32 size; >>>>> + __u32 flags; >>>>> + __u32 dev_id; >>>>> + __u32 pasid; >>>>> + __u32 grpid; >>>>> + __u32 code; >>>>> + __u32 cookie; >>>>> + __u32 reserved; >>>>> +}; >>>> with the response queue per fault object we don't need all fields here, >>>> e.g. dev_id, pasid, etc. Cookie is sufficient. > Wait, why did we make it per object? The fault FD is supposed to be > sharable across HWPTs. The fault FD is shareable across HWPTs. Kevin was suggesting that the response queue (for all outstanding IOPFs awaiting responses) could be put in the fault structure. Best regards, baolu