Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6804009rwi; Mon, 24 Oct 2022 06:22:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5qZNyiGsof4WMvyOX4RAW3Ty2H7yENnA1YExpf0dNVZ73BXk1JZ/u+yiGwG5iAjiouyBCr X-Received: by 2002:a05:6402:f18:b0:460:cf08:2b41 with SMTP id i24-20020a0564020f1800b00460cf082b41mr20072268eda.400.1666617740540; Mon, 24 Oct 2022 06:22:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666617740; cv=none; d=google.com; s=arc-20160816; b=NgGbAmy+/0/8KNX6T5/39wu/LjEd1YXFMioHtp12tiRDmw6Czr2yfqwCvJy/7p9gL6 08Akv1G/29Zye8oVJrNCtFa5WwkWJ9Jp+b1GjO2fotGDo/ze2oZAamLgVx9ms9etRfgP 1Et14ZJuAzx/5EH2srdztcVEvAS9L+v3lpWCvM5SvoxPfLjkG3C8Os2u/1WAkPVfZR/o lJuFahYniQI8bPhoR74vULBYT9DD8tQO/T2M7XbxUS+0ZGiCf4hvYzM68/5OeZXQgWeL ryPD/pzniB84tzRacDv3PccSZLTJNIvsfLAsSPBphZiH0Tx29erTLcWqhyVvXK/tMJiN lSaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=lmDXjWDbzeRAAinxIUP48fheIu9ywPgXIW0o1gwdOzo=; b=n/uZGqKySj+PWLs0sVLxcke0uCoS1tEmxvL40DKCUfPz/BjFJDV0jWfuHlnMH5yZmR zL6YOtXRewGbBsFps8D0XzXVPGtel+m3kENLqTnl2ZOhcJt3UkNTEtw7qN7IDq1mBRD1 0/xsJ2yTyW3lHC2jhEzvJN6Oq+p1Lao4yVrjmjdLnMSv7Mfjt4rFcsFS4Kfs2AylULpM Sgpi8wKFbN1ZKmVdiyRIB9Q0P2tSAFfh5culsgXMB+5O8jdpL2AQQWjL9Ui2Jda7g68V GLth2Hay9+bj8267QE9hw1HguXmCGN+WvLMTz2E6OGDOI4X479Y+P8eoD7gqheLrLgvf j4QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=XevXOugM; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qf24-20020a1709077f1800b0078a4aad3141si29200946ejc.211.2022.10.24.06.21.54; Mon, 24 Oct 2022 06:22:19 -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=@broadcom.com header.s=google header.b=XevXOugM; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233659AbiJXMYB (ORCPT + 99 others); Mon, 24 Oct 2022 08:24:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233540AbiJXMWx (ORCPT ); Mon, 24 Oct 2022 08:22:53 -0400 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CBD21157 for ; Mon, 24 Oct 2022 04:59:22 -0700 (PDT) Received: by mail-io1-xd2a.google.com with SMTP id e15so7486166iof.2 for ; Mon, 24 Oct 2022 04:59:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=lmDXjWDbzeRAAinxIUP48fheIu9ywPgXIW0o1gwdOzo=; b=XevXOugMqRF1oIpGbTIWwAaffV0qJS+9xjgf8qkbi4//DM9GGNtIcE/LtU6LK/Ac/a Sqd2k/eM+v3wTCG9c8r8FgdpLx7ZccbOrE0u605lMJegkkLAheMzLSqTep/yq6KyzbhW 9AIXYR57KwIZGUp74mrEZ2GzAQYDAJPFMbSFk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lmDXjWDbzeRAAinxIUP48fheIu9ywPgXIW0o1gwdOzo=; b=GPj770hnZ7y+eHQ9q8vwSsWlRF380SKZOQTesnN+M/QoTying4y/Lu8qGSADB2zsgk cZ/xWRc3RrXgKsopbuolHcPZel1upCWQb4iY3iOkWP+5y//1Q22WN2qVZ0NOUepPmLy4 LDK1QniAeRa3zVcnQRhSGVNt4Byg9dPcXgkSGKaWSWbdlGcNcbeoMKt1BEM8OIz3I9Zn BW8lBIBD95xLorbFhHMdVDHnLLZaTAYkixl+BR5T4X1AP70aHdqnqeovwjm9kw2C6Lai fXrWx3zVk9ycUdrlfAv7SJqKqcut4NR+BTTbdWzr08nfxHjv2NeQfYiB4l4+CTKW0eyX gmuA== X-Gm-Message-State: ACrzQf0L+njLta8d/0fwVuvnCONIHaJNwrYflZUl1Ql8iY9uQJxtmA8l thKNm6/nTJlzvdFMeZdoiLzBPQmuf4nV+l/2CfRq1w== X-Received: by 2002:a05:6638:272c:b0:363:e601:cb62 with SMTP id m44-20020a056638272c00b00363e601cb62mr21164710jav.284.1666612616150; Mon, 24 Oct 2022 04:56:56 -0700 (PDT) MIME-Version: 1.0 References: <85ad4508-b979-c792-e92b-01bc16260dec@acm.org> In-Reply-To: <85ad4508-b979-c792-e92b-01bc16260dec@acm.org> From: Sreekanth Reddy Date: Mon, 24 Oct 2022 17:26:44 +0530 Message-ID: Subject: Re: Report in downstream Debian: mpt3sas broken with xen dom0 with update to 5.10.149 in 5.10.y. To: Bart Van Assche Cc: 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 Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000fb5e5b05ebc67ce1" X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 --000000000000fb5e5b05ebc67ce1 Content-Type: text/plain; charset="UTF-8" On Sun, Oct 23, 2022 at 6:57 AM Bart Van Assche wrote: > > On 10/21/22 02:22, Salvatore Bonaccorso wrote: > > We got the following report in Debian after an update from 5.10.140 to > > the current 5.10.149. Full quoting below (from > > https://bugs.debian.org/1022126). Does this ring some bell about known > > regressions? > > Only three mpt3sas changes are new in v5.10.149 compared to v5.10.140: > $ git log --format=oneline v5.10.140..v5.10.149 > 2b9aba0c5d58e141e32bb1bb4c7cd91d19f075b8 scsi: mpt3sas: Fix return value check of dma_get_required_mask() > e7fafef9830c4a01e60f76e3860a9bef0262378d scsi: mpt3sas: Force PCIe scatterlist allocations to be within same 4 GB region > ea10a652ad2ae2cf3eced6f632a5c98f26727057 scsi: mpt3sas: Fix use-after-free warning > > Sreekanth and Suganath, can you help with bisecting this issue? For the > full report, see also https://lore.kernel.org/linux-scsi/Y1JkuKTjVYrOWbvm@eldamar.lan/. This issue is getting observed after having the below patch changes, 2b9aba0c5d58e141e32bb1bb4c7cd91d19f075b8 scsi: mpt3sas: Fix return value check of dma_get_required_mask() What is happening is that on Xen hypervisor, this dma_get_required_mask() API always returns a 32 bit DMA mask. I.e. It says that the minimum DMA mask required to access the host memory is 32 bit and hence mpt3sas driver is setting the DMA mask to 32bit. So, on a 64 bit machine, if the driver set's the DMA mask to 32 bit then SWIOTLB's bounce buffer comes into picture during IOs. Since these bounce buffers are limited in size and hence we observe the IO hang if the large IOs are issued. I am not sure whether this API's return value is correct or not in the Xen environment. If it is correct then I have to modify the driver to not use this API and directly set the DMA mask to 64 bit if the system is a 64bit machine. Thanks, Sreekanth > > Thanks, > > Bart. --000000000000fb5e5b05ebc67ce1 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQdgYJKoZIhvcNAQcCoIIQZzCCEGMCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg3NMIIFDTCCA/WgAwIBAgIQeEqpED+lv77edQixNJMdADANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA5MTYwMDAwMDBaFw0yODA5MTYwMDAwMDBaMFsxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTEwLwYDVQQDEyhHbG9iYWxTaWduIEdDQyBS MyBQZXJzb25hbFNpZ24gMiBDQSAyMDIwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8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