Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 582FCC433F5 for ; Thu, 4 Nov 2021 17:11:52 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2114461186 for ; Thu, 4 Nov 2021 17:11:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2114461186 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.221801.383685 (Exim 4.92) (envelope-from ) id 1migH0-0005bd-TQ; Thu, 04 Nov 2021 17:11:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 221801.383685; Thu, 04 Nov 2021 17:11:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1migH0-0005bW-QL; Thu, 04 Nov 2021 17:11:34 +0000 Received: by outflank-mailman (input) for mailman id 221801; Thu, 04 Nov 2021 17:11:33 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1migGz-0005bQ-70 for xen-devel@lists.xenproject.org; Thu, 04 Nov 2021 17:11:33 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1migGw-0000eT-R0; Thu, 04 Nov 2021 17:11:30 +0000 Received: from 54-240-197-231.amazon.com ([54.240.197.231] helo=[10.95.146.237]) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1migGw-0005ur-Kx; Thu, 04 Nov 2021 17:11:30 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID; bh=OAmyiZ0qzBRRYXBld9AroZiwwpPHFWtdzBbX+cGfx6U=; b=bVSdhBZTtsS2XKr+ekTzzvMmZ0 mEJiVelYpqClsHPeIlsyFxxm+KtL8y8f16Ou56zwC8t4chxSKi8fwTYGfCZz8+y5MlaAOblQxH29K rgGXcbqw4XJToX1xDRfkb+Vk0ZaMFlEXRcW769mpLqhMpjjfW3gkuxCGMUYxjJCC63+Q=; Message-ID: <8ff2dc1a-b640-ec2a-810a-c135f0399130@xen.org> Date: Thu, 4 Nov 2021 17:11:28 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [patch-4.16] arm/smmuv1,v2: Protect smmu master list with a lock To: Michal Orzel , Stefano Stabellini , Ian Jackson Cc: Julien Grall , xen-devel , Volodymyr Babchuk , Bertrand Marquis References: <20211026122903.15042-1-michal.orzel@arm.com> <70c30a6c-b779-805e-079a-41bb484894b9@xen.org> <01545115-e82e-2a9d-a8e4-da9676080c0f@xen.org> <4554621d-63da-ea3e-e56a-4e01d0cef347@xen.org> <24959.49895.14808.77881@mariner.uk.xensource.com> <9955c390-e5a4-0e58-f0db-b070249d3b16@arm.com> From: Julien Grall In-Reply-To: <9955c390-e5a4-0e58-f0db-b070249d3b16@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 04/11/2021 09:18, Michal Orzel wrote: > Hello, Hi Michal, > > On 01.11.2021 21:51, Stefano Stabellini wrote: >> On Mon, 1 Nov 2021, Ian Jackson wrote: >>> Stefano Stabellini writes ("Re: [patch-4.16] arm/smmuv1,v2: Protect smmu master list with a lock"): >>>> In regards to this specific patch and also the conversation about 4.16 >>>> or 4.17: I think it would be fine to take this patch in 4.16 in its >>>> current form. Although it is not required because PCI passthrough is >>>> not going to be complete in 4.16 anyway, I like that this patch makes >>>> the code consistent in terms of protection of rbtree accesses. With >>>> this patch the arm_smmu_master rbtree is consistently protected from >>>> concurrent accesses. Without this patch, it is sometimes protected and >>>> sometimes not, which is not great. >>> >>> It sounds like this is a possible latent bug, or at least a bad state >>> of the code that might lead to the introduction of bad bugs later. >>> >>> So I think I understand the upside. >>> >>>> So I think that is something that could be good to have in 4.16. But >>>> like you said, the patch is not strictly required so it is fine either >>>> way. >>> >>> Can you set out the downside for me too ? What are the risks ? How >>> are the affected code paths used in 4.16 ? >>> >>> A good way to think about this is: if taking this patch for 4.16 >>> causes problems, what would that look like ? >> >> The patch affects the SMMU code paths that are currently in-use for >> non-PCI devices which are currently supported. A bug in this patch could >> cause a failure to setup the SMMU for one or more devices. I would >> imagine that it would manifest probably as either an error or an hang >> (given that it is adding spin locks) early at boot when the SMMU is >> configured. >> >> The validation of this patch would mostly happen by review: it is the >> kind of patch that changes some "return -1" into "goto err". >> > > In order not to leave this patch high and dry: > I can see that Stefano and Bertrand are in favor of this patch and > Julien is rather against. Therefore I wanted to ask what are we doing with this patch. My main objection is on the process. We should not merge patch that doesn't fix a real issue at this stage of this release. That said, the patch is low risk and both Stefano/Bertrand are for it. So... > Do we want it for 4.16? ... Ian can we get your release-acked-by? Cheers, -- Julien Grall