Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp418502iog; Fri, 24 Jun 2022 06:39:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vnvN+XHb5DB5yj/6PcwjoqLoa7q60v9RRdrcYgSANyIctx0q2AbYicx+ougyX4BS4lAPVR X-Received: by 2002:a17:906:6448:b0:723:2e05:af41 with SMTP id l8-20020a170906644800b007232e05af41mr9870786ejn.423.1656077969980; Fri, 24 Jun 2022 06:39:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656077969; cv=none; d=google.com; s=arc-20160816; b=CC/9f1wAEHlVVl5xZqvEOji3tAAeiayt3VRMkU/3LYb1bqEdV/MI++VlUE94BuUKzW 3CfcGW4LNQIX8Av4aqxsbmiCCMl59UG4rIIF4LbsWbarTQFZ3AznHCvZspvDI3UFnjuH vVcSXcX0NVnq2Q8+uWGJ1luAsXDXN/20CTswjoD9MF8/fQisnP8HLofi8cmPFmtwwUb4 +BnABk3NvFPnmiMF4XdjG/Dn5H+RWK68zEiG0zotpO3Da6ZT2W/E8O3v1kcLAPJvqk2i TJp6J6K6Wkyab9Pl5GJJHZXFQX65HLkX9xrQ1jB3zho8uz4Oo92CvpAi/tQ/p457n5gN +btA== 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; bh=XGievRBgmxslBviMZGy2ib1VdfWYsInEufaSI9SJGck=; b=RWxuTVAphDgb82AvgOhFc8KfNgmAGNbZ/nOxR656rKJ4JrL0OJnVObpHoAvAXqS0Yi Vo3QkqXG9Q8gWTVue1wrapXfEtiC4p22Xh/vhBZB4vI6jJnuc013q8+kua1iaUrmLGr/ 6of4MOskG6HBdWOW5yLL2IY1x3jZQwTXWBrZFzsB1eFYkMRdlUu/UA91EMnJSy2M4l6Y GMK3B3bu03sA5Fh4GKMfig5VhRChj2WO9k5rIfihQoFrXur6CFzxO+0IJKXXfOuQFv7k hOrgnVsGB4HLyhwL1l+s63Sr459G9eTNyFcP5pgYdBmvh5HRX3Li5Ldh0ofKJVjYzV36 Isag== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v23-20020aa7cd57000000b0042dec850ef4si2744628edw.486.2022.06.24.06.39.04; Fri, 24 Jun 2022 06:39:29 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231982AbiFXN2S (ORCPT + 99 others); Fri, 24 Jun 2022 09:28:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231852AbiFXN2R (ORCPT ); Fri, 24 Jun 2022 09:28:17 -0400 Received: from theia.8bytes.org (8bytes.org [81.169.241.247]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 670E2B7 for ; Fri, 24 Jun 2022 06:28:14 -0700 (PDT) Received: by theia.8bytes.org (Postfix, from userid 1000) id 52E59672; Fri, 24 Jun 2022 15:28:12 +0200 (CEST) Date: Fri, 24 Jun 2022 15:28:08 +0200 From: Joerg Roedel To: Robin Murphy Cc: will@kernel.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, hch@lst.de, john.garry@huawei.com Subject: Re: [PATCH v2] iommu/dma: Add config for PCI SAC address trick Message-ID: References: <3f06994f9f370f9d35b2630ab75171ecd2065621.1654782107.git.robin.murphy@arm.com> <653fba02-7eef-5f0d-66dd-7599af84db86@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <653fba02-7eef-5f0d-66dd-7599af84db86@arm.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Thu, Jun 23, 2022 at 12:41:00PM +0100, Robin Murphy wrote: > On 2022-06-23 12:33, Joerg Roedel wrote: > > On Wed, Jun 22, 2022 at 02:12:39PM +0100, Robin Murphy wrote: > > > Thanks for your bravery! > > > > It already starts, with that patch I am getting: > > > > xhci_hcd 0000:02:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000f address=0xff00ffffffefe000 flags=0x0000] > > > > In my kernel log. The device is an AMD XHCI controller and seems to > > funciton normally after boot. The message disappears with > > iommu.forcedac=0. > > > > Need to look more into that... > > Given how amd_iommu_domain_alloc() sets the domain aperture, presumably the > DMA address allocated was 0xffffffffffefe000? Odd that it gets bits punched > out in the middle rather than simply truncated off the top as I would have > expected :/ So even more weird, as a workaround I changed the AMD IOMMU driver to allocate a 4-level page-table and limit the DMA aperture to 48 bits. I still get the same message.