Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1989573pxa; Mon, 24 Aug 2020 01:37:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4B1ViNBUx6RCz5aBmA9aGR1bnG0VxO85HKnc1e2oUHHqhDKbvSoz0zDc7PWdUBQtr7N3S X-Received: by 2002:a17:906:22c9:: with SMTP id q9mr4634379eja.158.1598258270865; Mon, 24 Aug 2020 01:37:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598258270; cv=none; d=google.com; s=arc-20160816; b=s9oWp9l+CwxjN2gqHQhDNUn1CWKifQzzLQevFcaGu3E5rRUJoQd4RpDgdj77aNKi8H +oucXhx7W46TeIFd7KzpDx6KaWsZOSuPYUBUGst6WENfko4Pn6rBBNuQslamSiU8x/fP KDF+ByWIK7Uw3g0o/pEDAu1S6lHAvr04eeKTrW/1yPS8z6vUl/bhbx1iZPXXMF7DLypr UPBmxCxcytVhqF+5DmilQxnkZieBd+r9OiCNC+PQ9dNTDLVCGHYNFdOfufl3nq3qeApN 76SYJSRCkkjfmJLCXlq8nrT+N7VheMrG2BCmF5f6JduchtMwlZ16gkoRjq9HtuwF8Dfj ZhuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:date:to:cc:from :subject:references:in-reply-to:content-transfer-encoding :mime-version; bh=M0dqQd+RJCxwM2exz8yr4sMC4hM1fcHU8bw4NkubPhY=; b=Llcj2aBQGxw8tR11TOXfno4fRsjXoe4SrWWqmUJf76Ojd+Jv+G3UCTVQFfvcztxH1B 9/0DGMrR5IWpByXRkAkR7xOSLHgwZ4X6kJE4/9jXaZ2vLou4Z9LPZEH84Yoay7RdF7KF fnft/KgAoouPCiCjA3safMHF+1XES3nDM+9Cq6YFdq6L0e1P49gCYJv9rnzBSnAjBggD zJYQkQkJ78kTX3tZc5plPBJgLGWoVI/XugwQrIHsoqfaRdj8PPmIprOQQZFJcpTOnMBb SXYJJtHGOUIyb4dPofEc3In8LpkU8hKLDVVfXeTNpbxZbpqJyHyRGpJTVMTEX4wJbLDR 94hw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn4si715205ejc.98.2020.08.24.01.37.28; Mon, 24 Aug 2020 01:37:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728165AbgHXIfs convert rfc822-to-8bit (ORCPT + 99 others); Mon, 24 Aug 2020 04:35:48 -0400 Received: from mail.fireflyinternet.com ([77.68.26.236]:59229 "EHLO fireflyinternet.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728138AbgHXIfl (ORCPT ); Mon, 24 Aug 2020 04:35:41 -0400 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from localhost (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP (TLS) id 22218848-1500050 for multiple; Mon, 24 Aug 2020 09:35:11 +0100 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT In-Reply-To: <65125687-14ae-182f-da07-7d29b4910364@linux.intel.com> References: <20190525054136.27810-1-baolu.lu@linux.intel.com> <20190525054136.27810-8-baolu.lu@linux.intel.com> <159803479017.29194.1359332295829225843@build.alporthouse.com> <65125687-14ae-182f-da07-7d29b4910364@linux.intel.com> Subject: Re: [PATCH v4 07/15] iommu/vt-d: Delegate the dma domain to upper layer From: Chris Wilson Cc: baolu.lu@linux.intel.com, ashok.raj@intel.com, jacob.jun.pan@intel.com, kevin.tian@intel.com, jamessewart@arista.com, tmurphy@arista.com, dima@arista.com, sai.praneeth.prakhya@intel.com, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org To: David Woodhouse , Joerg Roedel , Lu Baolu Date: Mon, 24 Aug 2020 09:35:11 +0100 Message-ID: <159825811140.30134.5347490249201789397@build.alporthouse.com> User-Agent: alot/0.9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Lu Baolu (2020-08-24 07:31:23) > Hi Chris, > > On 2020/8/22 2:33, Chris Wilson wrote: > > Quoting Lu Baolu (2019-05-25 06:41:28) > >> This allows the iommu generic layer to allocate a dma domain and > >> attach it to a device through the iommu api's. With all types of > >> domains being delegated to upper layer, we can remove an internal > >> flag which was used to distinguish domains mananged internally or > >> externally. > > > > I'm seeing some really strange behaviour with this patch on a 32b > > Skylake system (and still present on mainline). Before this patch > > everything is peaceful and appears to work correctly. Applying this patch, > > and we fail to initialise the GPU with a few DMAR errors reported, e.g. > > > > [ 20.279445] DMAR: DRHD: handling fault status reg 3 > > [ 20.279508] DMAR: [DMA Read] Request device [00:02.0] fault addr 8900a000 [fault reason 05] PTE Write access is not set > > > > Setting an identity map for the igfx made the DMAR errors disappear, but > > the GPU still failed to initialise. > > > > There's no difference in the DMAR configuration dmesg between working and > > the upset patch. And the really strange part is that switching to a 64b > > kernel with this patch, it's working. > > > > Any suggestions on what I should look for? > > Can the patch titled "[PATCH] iommu/intel: Handle 36b addressing for > x86-32" solve this problem? It does. Not sure why, but that mystery I can leave for others. -Chris