Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4693386ybv; Tue, 11 Feb 2020 01:28:20 -0800 (PST) X-Google-Smtp-Source: APXvYqyh0Yw6jP+o+1QoKy9weEOVZB5BsTGOxmfs1TySPCxIlmjmpGdfRBDpEofox1Ygl0m9mw6z X-Received: by 2002:aca:c507:: with SMTP id v7mr2294487oif.157.1581413300059; Tue, 11 Feb 2020 01:28:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581413300; cv=none; d=google.com; s=arc-20160816; b=aR7ONZKbo/WeH9YW2eYk9XT28cIIRnAiBDV/J73YxuIZJ5PAih3ovT9aJ6x0fd56Jh LQToLmV5m45T2K4hzTkKL1h60w8eeU0/6WsdVIKo5vn/oaDO2XnD7AyA8WbZ0sByoLIz xH7SUX6IOhiiVwjr3m8BdVmNbOcJ+uFnLZ0aKAAKIdC8nVU+V97qE0eyhS+Q/6WwJ4d4 VmB4c6Fw7qVFb3c8DQkVNQNwmN5AvmvvL4zeHB0iVTEDgR7unnzvAIWGjx8kr2fyGZPt EOIfSIgCDiNTamB/6fqVc5hnurAJ9SNykgPWnfdLfltVwbNZw6e/JoMu54x/t2yav16N eQqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=CyBYdlNzPZcwqhOp74T1XMugvpFC8qtdcMQo6cEAVoQ=; b=xWixGPfbIc3xKHkt+txWXx9BL3x8FdaQ6g2f7V7RP83HGRigfZouzuBOKMsNChKgdp ve/QsbdHPsEmblXP1V1/iDar9uKUGNx6kRKARDOC4kSbvYCv7aDUF9Mi6trFEKJxeAJZ tZPZDLmmjifrQhKXAVGZ4grESKqMYwwBePCNfnw7QQOKqcYuY1xIVU6oQRs0wor903Mp zXCKSh5Wew6if4WlGFenjl06EPRTMmq/tWbQwC5714lK7esjp7a9Jq0VKInOQC3Uxmg5 D+prU65YnLsWKTk3gBFiivYJSY30gyhagxsXpcOCEGzUzAey+cIkaoUQ0+jhAwP3pJ+6 HxIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b=aKwwSGpH; 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 j25si1490656oij.242.2020.02.11.01.28.07; Tue, 11 Feb 2020 01:28:20 -0800 (PST) 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; dkim=pass header.i=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b=aKwwSGpH; 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 S1727797AbgBKJ0e (ORCPT + 99 others); Tue, 11 Feb 2020 04:26:34 -0500 Received: from mail-qv1-f68.google.com ([209.85.219.68]:44893 "EHLO mail-qv1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727707AbgBKJ0e (ORCPT ); Tue, 11 Feb 2020 04:26:34 -0500 Received: by mail-qv1-f68.google.com with SMTP id n8so4623437qvg.11 for ; Tue, 11 Feb 2020 01:26:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=endlessm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CyBYdlNzPZcwqhOp74T1XMugvpFC8qtdcMQo6cEAVoQ=; b=aKwwSGpHuYhhyh8Ot2HBH1TVPddBoOM1IgloUFLULdhrSN3NAPSuSZIWQs8eem4tri T7JYQJS3SZMMJYLfxkVjJnYpnWq8vNKGUZ7+5ls966HknA1txKwRewAYNTulEG8CUpmG GDdDFylpEZsBJcSszVTY6u6KdbmlgXJgUiCXMiofFArq16MvBKq2ZBX8Q8AFPcquEHVI zUNFHD65i3sVF7dgjDhGLUq/plddXcLFKeCo+DsO24NhkvixeZaEiZ4rGPNUElJjT5wQ oh8lCGjDizwiTjjb850NGgHBA1iHQwHXcj6zuGJpveK3VBScYP+jSgJ1mmBKxin3qI8h pQjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CyBYdlNzPZcwqhOp74T1XMugvpFC8qtdcMQo6cEAVoQ=; b=a5zufoujNGAv4WD/SO50EgWKJZj67I1X9+GRGpcB1L6Bp2fm9qI7FezLKMQGH9Say0 7DSbVN5Z9Tx1UtXMonoUN8h6GedhhoHtoTv3nDUtYkdh3afuE0SAyF4QSLN9DXtKGCfQ a3HX1Q78DsqbqyFo//jW6I62EtqQ4+XPPqpweA10BdY7VklX/UEKK5Ava2zz+m/+ie1c s3ixxvhYk2l826mKRWAtM2S1tehKSvT6JsYYljqgsGRQENjzTTyYKeHe4bEuCmFrSkjB 5xjRsEBas/qANX4NYGyzSb4Yd9vzWfiiWlNPxgzrBPG+tc48ns2VCTmAYfBCB6oE6QVl n35Q== X-Gm-Message-State: APjAAAWORO8Di40FiFPsI4fFu5D6ar1ZyR0+zSIRX9O5itOVcVgwDzSk GViTQJ7Yirob3vcmkYzTZBS0i+ESvkaIsGcFA8UXNQ== X-Received: by 2002:a05:6214:1389:: with SMTP id g9mr13997301qvz.40.1581413192840; Tue, 11 Feb 2020 01:26:32 -0800 (PST) MIME-Version: 1.0 References: <20200203091009.196658-1-jian-hong@endlessm.com> <948da337-128f-22ae-7b2e-730b4b8da446@linux.intel.com> In-Reply-To: From: Daniel Drake Date: Tue, 11 Feb 2020 17:26:21 +0800 Message-ID: Subject: Re: [PATCH] iommu/intel-iommu: set as DUMMY_DEVICE_DOMAIN_INFO if no IOMMU To: Lu Baolu Cc: Jian-Hong Pan , David Woodhouse , Joerg Roedel , iommu@lists.linux-foundation.org, Linux Kernel , Linux Upstreaming Team , "Raj, Ashok" , "jacob.jun.pan@linux.intel.com" , "Tian, Kevin" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 8, 2020 at 2:30 PM Lu Baolu wrote: > > The devices under segment 1 are fake devices produced by > > intel-nvme-remap mentioned here https://lkml.org/lkml/2020/2/5/139 > > Has this series been accepted? Sadly not - we didn't find any consensus on the right approach, and further conversation is hindered by the questionable hardware design and lack of further communication from Intel in explaining it. It's one of the exceptional cases where we carry a significant non-upstream kernel change, because unfortunately most of the current day consumer PCs we work with have this BIOS option on by default and hence unmodified Linux can't access the storage devices. On the offchance that you have some energy to bubble this up inside Intel please let me know and we will talk more... :) That said, this thread was indeed only opened since we thought we had found a more general issue that would potentially affect other cases. The issue described does seem to highlight a possible imperfection in code flow, although it may also be reasonable to say that (without crazy downstream patches at play) if intel_iommu_add_device() fails then we have bigger problems to face anyway... > Will this help here? https://www.spinics.net/lists/iommu/msg41300.html Yes! Very useful info and a real improvement. We'll follow the same approach here. That does solve the problem we were facing, although we needed one more fixup which I've sent separately for your consideration: iommu/vt-d: consider real PCI device when checking if mapping is needed Thanks! Daniel