Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7396926rwi; Mon, 24 Oct 2022 14:07:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6yMfiAwkV87XEetJ4Xc9zG5W5JAUUwa6kMZ2v+hOevSZucCEb+Qtnd6KM7FrQ8tjgs4Wea X-Received: by 2002:a17:907:78b:b0:741:3d29:33d2 with SMTP id xd11-20020a170907078b00b007413d2933d2mr30555798ejb.103.1666645657741; Mon, 24 Oct 2022 14:07:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666645657; cv=none; d=google.com; s=arc-20160816; b=Vh8F2TJNKM1mFVjPpDiqWbDnbCAP7vW8ZWaAcHXw1BsqdZ+xWgtXusQfpgbnJbeq2m NYWRtPll59ZZCuh9AY/Q3SRmh4UNMwHDUEgbivbZ6Z5nRH9674LCCEvmEKNL00Bqtxa4 FjgkX/poK5JWDOHpBm5wZij2jfdjXz0XhlvVKmxMDjbbPoCdLnY9Sk1ZSCMZJoLibbNX rEckIpR93FSyJVdpwrsGTb09FXz2b5bp+xV/VvxwlCCNoZ+kN8aUlSj5KE6URjxCnMNQ 4S6yww/C3qZ07iia74XCZz3DukZ25t0RsaWAZho22oGuvOG4t5rVczAwpKV8qqye+1Hi vhKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=R2CozcFHwiChhVIqs9e1K7KGsaZbKqtzxGeJtPv9o4I=; b=pPI67UvgxJDQgFF+N1i5xMdVzmkpVh9uHaA/z1dj7tZ64aTE78RLC7ZXbqciSAMUhr 3jRU6Nu5MHDJUavTsu0WuCHxyb/G4EmuE7Hzm+L8SeJTliLDoK+nMzEDB5ZxIuqXOsbg bmxpC6Vh8BUf9t0Yst6hwx7ziVfBeS/jrdgU5KmOF1cSkSKNbPun6qkna6K4YYd69zH7 85iYUU1JMDtKey3Wb/4C5SDVspVwF8y012yI3rjaPn7lATcNfB1kTVyR96ORoWMSz/MF EL4riZHOP0lm8JGO5iXRsY6GO85642ddSJCRSimQRTDYgeefrcVZlisForCt5rIHU4xV upfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=kIseVJ2d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v17-20020a1709067d9100b007a953d421bbsi711091ejo.322.2022.10.24.14.07.12; Mon, 24 Oct 2022 14:07:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=kIseVJ2d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233053AbiJXUKr (ORCPT + 99 others); Mon, 24 Oct 2022 16:10:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231968AbiJXUIh (ORCPT ); Mon, 24 Oct 2022 16:08:37 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96B0D8E79A; Mon, 24 Oct 2022 11:28:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=R2CozcFHwiChhVIqs9e1K7KGsaZbKqtzxGeJtPv9o4I=; b=kIseVJ2df1bajoZTbCM6NTSzk3 aAMcxXbtdOSJSoQJcJ5AwEtJfcHjIKlO54CzW1473JnXWY+4pbRjbCnbhZkHDnFMSYQI16SHsQ0Un C5HUIGuZI3Vj+yi1EJ73edNhXPpC7mWC/77d38X96cylJ45BjMRtPVupLNQ3MekhFWX1tMFRA/mik PidTxoEXuf4sxtY10c52U0iGpLcR889au95SDPugZ9kZ9aGB1BmsNG/p1Y3hezN49AE1g7PlzKIz6 fBFxfL+yAc8Z7lM8uL8Nrf82mLnCBBDMeXHT7NPasxJeFoithuIP6hPw4h5SOmwzH9LS46qQFYM9e zw2/RcCw==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1on1Hd-002Ta1-SO; Mon, 24 Oct 2022 17:30:41 +0000 Date: Mon, 24 Oct 2022 10:30:41 -0700 From: Christoph Hellwig To: Sreekanth Reddy Cc: Bart Van Assche , Salvatore Bonaccorso , "James E.J. Bottomley" , sathya.prakash@broadcom.com, suganath-prabu.subramani@broadcom.com, "Martin K. Petersen" , MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, adi@kriegisch.at Subject: Re: Report in downstream Debian: mpt3sas broken with xen dom0 with update to 5.10.149 in 5.10.y. Message-ID: References: <85ad4508-b979-c792-e92b-01bc16260dec@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 24, 2022 at 05:26:44PM +0530, Sreekanth Reddy wrote: > This issue is getting observed after having the below patch changes, > 2b9aba0c5d58e141e32bb1bb4c7cd91d19f075b8 scsi: mpt3sas: Fix return > value check of dma_get_required_mask() Looking at this commit it seems odd. dma_get_required_mask() should only be used as an optimization for hardware that actually benefits from a lower DMA Mask. That means either classic PCI that requires DAC cycles, or firmware architectures like aic7xxx that do need additional overhead. I don't think either is the case for mpt3sas, so I think (in addition to fixing up the Xen required mask), mpt3sas should do something like: diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 4e981ccaac4163..295942a8989780 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -2992,8 +2992,7 @@ _base_config_dma_addressing(struct MPT3SAS_ADAPTER *ioc, struct pci_dev *pdev) struct sysinfo s; u64 coherent_dma_mask, dma_mask; - if (ioc->is_mcpu_endpoint || sizeof(dma_addr_t) == 4 || - dma_get_required_mask(&pdev->dev) <= DMA_BIT_MASK(32)) { + if (ioc->is_mcpu_endpoint) { ioc->dma_mask = 32; coherent_dma_mask = dma_mask = DMA_BIT_MASK(32); /* Set 63 bit DMA mask for all SAS3 and SAS35 controllers */