Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1750677rbb; Mon, 26 Feb 2024 22:57:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWGaOeA2ekTetixPNiG0ZocJoupFY58MPvcYgHy6LOGVdJCgh0OwvuBaqcbOZ1Oq75KUafCSI231/ZertbTGin9Bh7MqjNVyySAMXCWSg== X-Google-Smtp-Source: AGHT+IGtLBBnujtH/6SlqhX02J+XZH3+0pK8sA6n0vxfRhsqChbjQkROpPDWbdX30OxafK52Sdwp X-Received: by 2002:a05:6a00:1ac7:b0:6e4:6484:1a36 with SMTP id f7-20020a056a001ac700b006e464841a36mr9997796pfv.21.1709017067256; Mon, 26 Feb 2024 22:57:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709017067; cv=pass; d=google.com; s=arc-20160816; b=Jd6jXL0h/1VT4ttVE6p4HKfMdRK9607kHGi7GiaemLJHZ8n/eetRJsx6pWy04m8eqa hBY9U4KLXToD77LrX1dllemUDqM3LxCWLvXod2zxZDXwasiMOujOBJ8P/2i2tXBhQ8sE 6Wk4qMcXIaPdYmbt3TyIzF7la6UeH5FunZWxkfWK/6mnugr39KqzGWphQxSEHYRFy+Pg 02UN32Cj7oje/XofitXxr0MX+2KLL20Vfyn8NrmLwObgHUR/SshfiDMllTa5DWWYGqBS 1XFZ5FALoHc4Ji22h75e6TQAgEmwdjr+QwS75EW7CqeSpKB6HDheafN11FEEx/s7xyL0 1XJg== 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:references:to :content-language:subject:cc:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=dNnnybtyTycVhO6/c05vKlp6LN/RmXxyy9gkAe1eJqw=; fh=NiPtIDr+Qy8yliT5hQbWv7nd0BACOqZ8kAogoW+0Ap4=; b=HPxkWWI2xlwSwjpVmuN4L1FkXJmh6TM/JAZ96wTyzv5Bf33BPUi5JcYOwJ46GhZP+j NmHeVPD/SmL2dM5vmzEjdnXJKkN4GFWms5KeGYkjIeEDC7l+m/q5Cg4ZJyhXfWkoDnYe b9EE92vUHcDqwOjmUPknvtUYUEwr+k9yxIP0iuX4yK4LCHxYUFG8e1auMuUmQ8eJEINo NyWNLljRWqPBvDzZv/TKhPQFIddE28g4CIfLGaqfkE8+U3XHnqhhg6322x1vzXp8mbHx 5vUsNPEPQHDnpbzMG0JuY9A6hdCXBkPsKi/Ys0JBWVRgQsY6Kb5FFSJuROFjU3IPuZJh jY3g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IId5QlNo; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-82767-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82767-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t126-20020a628184000000b006e4f4b49f90si5005554pfd.137.2024.02.26.22.57.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 22:57:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82767-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=@intel.com header.s=Intel header.b=IId5QlNo; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-82767-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82767-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id EE22F282582 for ; Tue, 27 Feb 2024 06:57:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E2880535C8; Tue, 27 Feb 2024 06:57:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="IId5QlNo" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 414CA5C82 for ; Tue, 27 Feb 2024 06:57:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709017061; cv=none; b=Cm9gOcyDJ2wA0lMl46FMa0uPhkbMxk8x1XN+o8MMBjZfnzI+eR9OT4B6wxJ8j7m0L2RPG8kYV8nEmVIw2+C1XG2HEb/rospAmUFntoWqoL6gmh7ALsVdaGOjev4YNyX4QCIwoORhO/ON6YwDjAHXEjFpoGSVIt9b0WP9mDr6d4E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709017061; c=relaxed/simple; bh=YvGZDgLgIVJF+BHE7Jc79utI2MU3LMX2wIjPPgVMfJQ=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=U4XB0385opC7zw9uhkKHneAv1FtMz3YCP4eD2sQLxdio3Pp2Vbl80yGn/ZVuLYpb7L2W5kON/cesuOA+2uccHjI0ENZN22XewekPnwZjfiIhKsrq18tHa78zvtRL0/Kdhw3+W13d1/dgYIAjHj7Am7237EgB6UJWML7VeeHvXb0= 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=IId5QlNo; arc=none smtp.client-ip=192.198.163.10 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=1709017058; x=1740553058; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=YvGZDgLgIVJF+BHE7Jc79utI2MU3LMX2wIjPPgVMfJQ=; b=IId5QlNoPjDwC08tl04I8OwsBq6eAAi1MMgxhjbI8gHKnX2SzIYsHjRl T+TdcGdeY+fwxvH2WbGGwpG6os9xoBSz3vWo5IZECOsFaSgNmz1w1Lu5C bwGiG9YF8eh8oAm+yxFgB3Z7e4CTnihRiv0Xuo7TgBCG5Gt5SVW5IbpUR b/6R7re18BTIz05jKLAhYstpZyWFk+C7ZjWlPI2SBPKq8fiGzINrVKBRu 7Eh/rHgs+k4NsssIR/K6cnLxWF0HpdbNit0wBoP467O0KIOq0qPFAeRD+ rkhjPCT1CvSdMkLE7TPKq2HQezYp+SWvRDRelEpcW/mYgGlaF9o/ur7P5 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10996"; a="14766526" X-IronPort-AV: E=Sophos;i="6.06,187,1705392000"; d="scan'208";a="14766526" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 22:57:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,187,1705392000"; d="scan'208";a="7146296" Received: from allen-box.sh.intel.com (HELO [10.239.159.127]) ([10.239.159.127]) by fmviesa006.fm.intel.com with ESMTP; 26 Feb 2024 22:57:35 -0800 Message-ID: <07bce1eb-85cb-48be-9e46-8e9d075f9452@linux.intel.com> Date: Tue, 27 Feb 2024 14:51:40 +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, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH rc] iommu/sva: Fix SVA handle sharing in multi device case Content-Language: en-US To: Zhangfei Gao , Joerg Roedel , Will Deacon , jean-philippe , Jason Gunthorpe , "Zhang, Tina" , kevin.tian@intel.com References: <20240227064821.128-1-zhangfei.gao@linaro.org> From: Baolu Lu In-Reply-To: <20240227064821.128-1-zhangfei.gao@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/27/24 2:48 PM, Zhangfei Gao wrote: > iommu_sva_bind_device will directly goto out in multi-device > case when found existing domain, ignoring list_add handle, > which causes the handle to fail to be shared. > > Fixes: 65d4418c5002 ("iommu/sva: Restore SVA handle sharing") > Signed-off-by: Zhangfei Gao > Reviewed-by: Jason Gunthorpe Reviewed-by: Lu Baolu Best regards, baolu