Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp266563lqg; Fri, 1 Mar 2024 04:54:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUjnHwpnUNguQ7wvDVEOkqFYS2m4lbV/coZ1DHUWsvtTtDOAkOhkwlW9tGisjIRkIxMaaVMSBalZjs3jPeRpv65zRCZsA0TOTpwOIubVw== X-Google-Smtp-Source: AGHT+IEpc0sM4aWRBM1Mb2EKydfqobSZ4qmMT4UFY8GI2Gzaajiu0Iikxzw8MtbspYBq/rNLrPGC X-Received: by 2002:a05:6a20:af11:b0:1a0:ff4d:eb2d with SMTP id dr17-20020a056a20af1100b001a0ff4deb2dmr1091030pzb.54.1709297670818; Fri, 01 Mar 2024 04:54:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709297670; cv=pass; d=google.com; s=arc-20160816; b=LIOWjwND+iRJrnbkecL3Qvg7ReveEMu5QI/Z8h1OKU4r1zS/AumOLLfgYerRDg83nD LS7jSj3/ezQb2eAfDpdYr4CGq0ml2cDAMtxpRnGCthKWuHAU3yH7jSDOOBc7AByDTmD+ 9sjBMD9y7edLMTmBMG2b4jHGNITB4CYKC8An9X7N6PDujjdwL+l4GtBXOXvF1y34SoGJ X5jIpm3RjGF31FpOuPWa3BxqFvtbTROkrdEqcqXSsTQy2i/ct5/4q7dP8/FeDdzWPJAJ jL4AgheY4tmy9Hh1urQ4vY/EJCpNWMcsaB+UeJEqt19B2N7cZxq5CIcDP3qzaXyMIWUg WrTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tS93Fg1f+nQp0YVy1YauAvVTkCgYuwtyjlyDwZGhoJc=; fh=0vm/HkT37CabRKY7zOwrCu+HmejIQz6+ktvRKZVALVM=; b=Uvin3Z1PmJ9tBwC2VIfvkffCzriaCajybQQ4vIVlLubtCLkm5uXTwy+LY1LZhXat3e AGZlBb4NozyH6ZBiE1cyBg12PeBS/GsJF00D7e3BwdKd0Ut5SKlz2NZFIlQytvVVrfQa X4O440BMGfRw+qhPNyfJknQI6y1297CNnaxpLXSQ7DgrsnhFFeocuJ5+dMMEDCpNK+iA 32JqmqFgWL/ExrgFq0/6jdoPtyR+F9XgWHvGL57xnZaFJIkDVJduxisvX+056YOwcYgO ZuH/wUagMOBy+CV/t7/X64fqOoga+IC6IiAz7Xg6XbRYBrbZ9v61bqb49IoNWoSrIOZ5 HCAg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@8bytes.org header.s=default header.b=xd3dGNzG; arc=pass (i=1 spf=pass spfdomain=8bytes.org dkim=pass dkdomain=8bytes.org); spf=pass (google.com: domain of linux-kernel+bounces-88421-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88421-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q3-20020a632a03000000b005d7a78810acsi3309344pgq.278.2024.03.01.04.54.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 04:54:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88421-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@8bytes.org header.s=default header.b=xd3dGNzG; arc=pass (i=1 spf=pass spfdomain=8bytes.org dkim=pass dkdomain=8bytes.org); spf=pass (google.com: domain of linux-kernel+bounces-88421-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88421-linux.lists.archive=gmail.com@vger.kernel.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 24EF8B23B24 for ; Fri, 1 Mar 2024 12:54:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2741A4087D; Fri, 1 Mar 2024 12:54:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=8bytes.org header.i=@8bytes.org header.b="xd3dGNzG" Received: from mail.8bytes.org (mail.8bytes.org [85.214.250.239]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 20E264086C for ; Fri, 1 Mar 2024 12:54:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=85.214.250.239 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709297661; cv=none; b=cUHXz9axS2VGPMKdtdH9m3xxT/vN6+QwRpeozuqEFF6P4QAomEwd+Dj/X9/V6bv6MMkDy96aaWvc2qOs4xAOeQAuVW4pt+OK32dFbIOc1iokcn358IDmRgn0OLC2JLWVzKFLQ/mslF0jMyETnU/DrDEJls6SsfoyOtTzgZDx66Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709297661; c=relaxed/simple; bh=RlOTojB1WrxiBSIgGdoSe1kmYX6YyS/mIeUDv6h3h8I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IWdtR4Bb2nxhH+OXeRblEtVzVRIhCZX6IKeesT62Rxh40CAHY0sQUF+uTQnTTuTJQcoVgCzHGuC0z7kcXSuopkOjbPtlM2OenikxHoGJ4OZ0PyBWwTU0SCGNsK1q1tlYEzDa62B4+aFhR9kUHaHAI+8L3rmV+QgnXiHUuAljDSU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=8bytes.org; spf=pass smtp.mailfrom=8bytes.org; dkim=pass (2048-bit key) header.d=8bytes.org header.i=@8bytes.org header.b=xd3dGNzG; arc=none smtp.client-ip=85.214.250.239 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=8bytes.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=8bytes.org Received: from 8bytes.org (p4ffe0c3c.dip0.t-ipconnect.de [79.254.12.60]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.8bytes.org (Postfix) with ESMTPSA id 21DC41C1D53; Fri, 1 Mar 2024 13:54:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=8bytes.org; s=default; t=1709297658; bh=RlOTojB1WrxiBSIgGdoSe1kmYX6YyS/mIeUDv6h3h8I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xd3dGNzGSqM8OmeEoO5bgWEgEJ5J/qky05JZkZpW5qZ90YZnoNaccH3yLDz7QMr+S RPvjjTNd/1g+fwubU9TIQIIdTPp8BMTmah7NtEjWdNXtbZa3zbV9OPuGG4AiCfBsYf n6kIGriwFoAWptGCwNI7jSzW1nPFFSpVbawv8b8Sl1DejtOHbn79Ed8wBq1IK9/bzf M2RkMQmE4fHafw+eIrE+tUEBGmKvqC3AdrGj5eKZwNnu9v8tOf9Jqyt5Ni8xZ9jW0i aTrbGHrZ5G2Mj9rVBrep/jcQIxT1ngmZnSPn4cCIgFAJUph8ItCh7xXf+cNF52i+Bx A7eWAknskZFFQ== Date: Fri, 1 Mar 2024 13:54:17 +0100 From: Joerg Roedel To: Zhangfei Gao Cc: Will Deacon , jean-philippe , Jason Gunthorpe , baolu.lu@linux.intel.com, "Zhang, Tina" , kevin.tian@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 Message-ID: References: <20240227064821.128-1-zhangfei.gao@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240227064821.128-1-zhangfei.gao@linaro.org> On Tue, Feb 27, 2024 at 06:48:21AM +0000, 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 Applied, thanks.