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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C98BEC6FD1D for ; Tue, 21 Mar 2023 10:49:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230407AbjCUKta (ORCPT ); Tue, 21 Mar 2023 06:49:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230410AbjCUKtY (ORCPT ); Tue, 21 Mar 2023 06:49:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFC155259 for ; Tue, 21 Mar 2023 03:49:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7BE0AB81289 for ; Tue, 21 Mar 2023 10:49:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DE89C4339E; Tue, 21 Mar 2023 10:49:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679395748; bh=lFrhGmdkTFxcK/nSQtquZbsauyHMMzGRh7efYYXHDPo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JR/nMl0sAK2bVSXiC1DPMMbcGlrE8/62NrjsAh9CJH82qAYCy0lbsuqmNSPOpLzS7 Xk0gykLi3WrcpUVhjh3NfUTYwV7EDPolA1tkgooppWcTb1JE6BC1G8bHqLKLpjutED D63rhek8VTSdxZQXQdiv6RQRFk06Yrja7+1ORTcwBZsjiAsvNQ7BEoG+GNvsQqKwk4 JshAQybdAszRiF4cT6WMvqYICUdyUdjKVpeqy2JSpK2vJHKZc6I6L+XOXNHtabCZHP vro1WRtEcVxQymfJ6Hnm0s/HjMI09Ter4DGJVjS1kkehpLNnniFaD6I1L2g2xNzg9l OIDoHqKHZ+9Ng== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1peZZY-0004Yz-0G; Tue, 21 Mar 2023 11:50:32 +0100 Date: Tue, 21 Mar 2023 11:50:32 +0100 From: Johan Hovold To: Manivannan Sadhasivam Cc: will@kernel.org, joro@8bytes.org, robin.murphy@arm.com, andersson@kernel.org, johan+linaro@kernel.org, steev@kali.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] iommu/arm-smmu-qcom: Limit the SMR groups to 128 Message-ID: References: <20230321091332.18334-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230321091332.18334-1-manivannan.sadhasivam@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 21, 2023 at 02:43:32PM +0530, Manivannan Sadhasivam wrote: > On some Qualcomm platforms, the hypervisor emulates more than 128 SMR > (Stream Matching Register) groups. This doesn't conform to the ARM SMMU > architecture specification which defines the range of 0-127. Moreover, the > emulated groups don't exhibit the same behavior as the architecture > supported ones. > > For instance, emulated groups will not detect the quirky behavior of some > firmware versions intercepting writes to S2CR register, thus skipping the > quirk implemented in the driver and causing boot crash. > > So let's limit the groups to 128 and issue a notice to users in that case. > > Signed-off-by: Manivannan Sadhasivam Reviewed-by: Johan Hovold Tested-by: Johan Hovold Johan