From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEB7DC433E1 for ; Wed, 8 Jul 2020 12:26:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 955A82078A for ; Wed, 8 Jul 2020 12:26:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728790AbgGHM0E (ORCPT ); Wed, 8 Jul 2020 08:26:04 -0400 Received: from verein.lst.de ([213.95.11.211]:35063 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728681AbgGHM0E (ORCPT ); Wed, 8 Jul 2020 08:26:04 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 7232068AFE; Wed, 8 Jul 2020 14:26:01 +0200 (CEST) Date: Wed, 8 Jul 2020 14:26:01 +0200 From: Christoph Hellwig To: Robin Murphy Cc: joro@8bytes.org, hch@lst.de, iommu@lists.linux-foundation.org, jonathan.lemon@gmail.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, baolu.lu@linux.intel.com, dwmw2@infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/2] iommu/intel: Avoid SAC address trick for PCIe devices Message-ID: <20200708122601.GB19619@lst.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Looks pretty sensible. > - if (!dmar_forcedac && dma_mask > DMA_BIT_MASK(32)) { > + if (!dmar_forcedac && dma_mask > DMA_BIT_MASK(32) && > + dev_is_pci(dev) && !pci_is_pcie(to_pci_dev(dev))) { The only thing I wonder is if it is worth to add a little helper for this check, but with everything moving to dma-iommu that might not be needed. Btw, does anyone know what the status of the intel-iommu conversion to dma-iommu is?