Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1939423pxa; Sun, 23 Aug 2020 23:32:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfv2KvAzNdsxGCyjsW4Ckg142tmtA/Pf8AZtzfxwAwUSGH9qaEeo1WQhuWu7M6Qo95g09B X-Received: by 2002:a50:8d01:: with SMTP id s1mr3886547eds.225.1598250764213; Sun, 23 Aug 2020 23:32:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598250764; cv=none; d=google.com; s=arc-20160816; b=X7X/AB5VDsN9PEHbo+BxKHwbZsWdNSuki/Vx7IN1u8UeuKrjaU0KROwpPZ6yLaXFAU w9tRsT5BDxc9BltLk3nT/5rS18fMaVmJiHUcN/igJiQyzxKSthcBgLZUDpOcNCCPE90h ME9u9Kraps1GbtTtSj3RHh8iXbVnoyH70f05fiKslbZa0jQGL5mpJHKrBaB9xkNQI3Ir 8QueB6VWZIF2tH1jFmSVc1ImjRFGNPAgcnmR2dm+kKrXGEwpiyL8mdLEiGABcgcYp/Hm 6pPpesZSrfEcZ6qAApL8y8tZ9zGqoyPWxYXWAxByoe7iaB5yiu5/QQPCsbvSV3Qz3GjK oM6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:cc:ironport-sdr:ironport-sdr; bh=tRCjiW0w6SjIN1MEZFc2WLGhfonGoW7BrJRIRoJgd9Y=; b=S+MDVLiNd+W0sP3Y2x5qI8/pbiSnjpf1EUuMtR+W48BtDXaw9omT2BmuC71DVDNLJt SA/OllKUXV+/7QHDNlBgum7ao8tMRh1BDZFx5KHdksu1RNUHsM+dJFwXahYKRPtnlwN+ KJXjIkQv6s31NDZTIfih4ZOtX8jbUGln7q5AfZG4U/VJdMCE3v24X3E3V5W/atfNdohV 5DTkDxmghUXm8fzQKrygbaaUrFHdtLg22nmJ5/WA+AfD/4WbSLrcHzeIl1y1XLRPE1ll oKMxnIBh6YEFg6J2d12MotiZVkoBUC9pUYwWsCG0ph50i481ZuQ1nqXDIs0TkNclT5fE 43cQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l60si6570831ede.535.2020.08.23.23.32.21; Sun, 23 Aug 2020 23:32:44 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726156AbgHXGbc (ORCPT + 99 others); Mon, 24 Aug 2020 02:31:32 -0400 Received: from mga07.intel.com ([134.134.136.100]:9119 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725730AbgHXGba (ORCPT ); Mon, 24 Aug 2020 02:31:30 -0400 IronPort-SDR: fciyrLnLhcyDOMgKygdEtc4ZIMvLA2YrCx7dv/dyfyFqUH6/0KfR4KK7/DDub24o10JQogztvf +DDARQXrKuIg== X-IronPort-AV: E=McAfee;i="6000,8403,9722"; a="220116974" X-IronPort-AV: E=Sophos;i="5.76,347,1592895600"; d="scan'208";a="220116974" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Aug 2020 23:31:29 -0700 IronPort-SDR: 0V4ihqf+WXUXYsQ0IJPdnuxlWzcWibJUmcIDItXdB12I1iL9p5Tn/KGpZmxlqjCoYrCqAw7vJq BDM21KyjS4Ow== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,347,1592895600"; d="scan'208";a="328377856" Received: from blu2-mobl3.ccr.corp.intel.com (HELO [10.254.214.99]) ([10.254.214.99]) by orsmga008.jf.intel.com with ESMTP; 23 Aug 2020 23:31:24 -0700 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 Subject: Re: [PATCH v4 07/15] iommu/vt-d: Delegate the dma domain to upper layer To: Chris Wilson , David Woodhouse , Joerg Roedel References: <20190525054136.27810-1-baolu.lu@linux.intel.com> <20190525054136.27810-8-baolu.lu@linux.intel.com> <159803479017.29194.1359332295829225843@build.alporthouse.com> From: Lu Baolu Message-ID: <65125687-14ae-182f-da07-7d29b4910364@linux.intel.com> Date: Mon, 24 Aug 2020 14:31:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <159803479017.29194.1359332295829225843@build.alporthouse.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Best regards, baolu