Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1272403ybl; Fri, 23 Aug 2019 16:39:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqza/OP6TaniEFqiOvovxnUUrnpiN/XSpJQbhovlTa1HZ9piLwRRSoKtW3BBWAQgyi6ziqTS X-Received: by 2002:a17:902:9a95:: with SMTP id w21mr7452218plp.126.1566603580006; Fri, 23 Aug 2019 16:39:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566603579; cv=none; d=google.com; s=arc-20160816; b=xzCRBs/+w8zklhe5wXVf/Ni1l54NTtPNDH33tqmfSUk61arIzAc22c6V5M/l42vccF F2JSQx4AMJT+AGVlbpa4lwPDr3ftIracqIuPkj+RRt/8lbvS9BiCxCXh82uIHl29hikW cxDZ++OwGT2lmoqMkl6jteY7ULznyBzKzL0sJtfB/2UOS0B5z3CFr+vUiPxRTsOdNCE4 /+3VCoLm955BqZSeJk/8KjNUWnZ/nCkSnTpLstCpXaOBgqvrAQiv3svQoKsxAz0+qv5r v79g4Qaq23UWtY6HnlJB8TBH4JMtyHqoOGvHJEcokQGuJwUXU9012o02oTmUnvStv4/4 4CEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to; bh=aQIeL3v9JjO8YN59vwH61h2gevG8KcCDMGX9zWbHLMc=; b=IW17CVHJTqzlj9RjkCZa089/6uG8Sz6LtR9C8OBTaOPExGD+xwAIOZMySc0PIzRvqa 8F5WEyoWTjftCi7j5QbBpXLnlsUlvwqdF2D7YAoFxGtxE6+FQeGuZMSsh6sYFWSrVMxx P0nqEc0cwH5DdaKJ179BUxdqRpkUsvlrXKOXeZCnR/QPHb6qoZGvFO8ju7m6ozOVS+08 jsayABsszvmkota+y8BPxlcTHXJyucOFm9R+Hp8bIGbuHKjfKOkxQ3NdmPDf38vpbObI Ewi6IrpC4aKjL9I2xkvBLw9WQuePfXYkQ7qVYOF8561vcBdxm+apDs04eqRjBMxkPKhH r+kA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 185si2983841pgc.522.2019.08.23.16.39.25; Fri, 23 Aug 2019 16:39:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726457AbfHWXGo (ORCPT + 99 others); Fri, 23 Aug 2019 19:06:44 -0400 Received: from ale.deltatee.com ([207.54.116.67]:37440 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725782AbfHWXGo (ORCPT ); Fri, 23 Aug 2019 19:06:44 -0400 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1i1Idf-0004su-T5; Fri, 23 Aug 2019 17:06:36 -0600 To: Nadav Amit , Joerg Roedel Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, David Woodhouse , Jacob Pan References: <20190820085317.29458-1-namit@vmware.com> From: Logan Gunthorpe Message-ID: Date: Fri, 23 Aug 2019 17:06:34 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190820085317.29458-1-namit@vmware.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: jacob.jun.pan@linux.intel.com, dwmw2@infradead.org, stable@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, joro@8bytes.org, namit@vmware.com X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [PATCH] iommu/vt-d: Fix wrong analysis whether devices share the same bus X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-08-20 2:53 a.m., Nadav Amit wrote: > set_msi_sid_cb() is used to determine whether device aliases share the > same bus, but it can provide false indications that aliases use the same > bus when in fact they do not. The reason is that set_msi_sid_cb() > assumes that pdev is fixed, while actually pci_for_each_dma_alias() can > call fn() when pdev is set to a subordinate device. > > As a result, running an VM on ESX with VT-d emulation enabled can > results in the log warning such as: > > DMAR: [INTR-REMAP] Request device [00:11.0] fault index 3b [fault reason 38] Blocked an interrupt request due to source-id verification failure > > This seems to cause additional ata errors such as: > ata3.00: qc timeout (cmd 0xa1) > ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) > > These timeouts also cause boot to be much longer and other errors. > > Fix it by checking comparing the alias with the previous one instead. > > Fixes: 3f0c625c6ae71 ("iommu/vt-d: Allow interrupts from the entire bus for aliased devices") > Cc: stable@vger.kernel.org > Cc: Logan Gunthorpe > Cc: David Woodhouse > Cc: Joerg Roedel > Cc: Jacob Pan > Signed-off-by: Nadav Amit This looks good to me. Reviewed-by: Logan Gunthorpe Thanks! Logan