Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp844483ybl; Wed, 4 Dec 2019 11:52:57 -0800 (PST) X-Google-Smtp-Source: APXvYqyNoM2QBxmYnl3cQY7KFxrfXC4bDmLig9+uDCdskIkXh4XY+X9UmBvTduK4+MmxNwhZTEeD X-Received: by 2002:a05:6830:1cc4:: with SMTP id p4mr3699658otg.349.1575489177145; Wed, 04 Dec 2019 11:52:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575489177; cv=none; d=google.com; s=arc-20160816; b=qRDvF8LOdwFnOk8+P841biWzON82UVIvdVnUCS4nylpeIfyAJMHUN8SrwARbI9H+0P 5upLIOuPn3CPi91lTB7g/2ZoR6yLPM7dSm1xrOPxxv6H2OZaRqSXjpedEPeSxVftXb4R I505JgxopEsIf4Ch5BHWkY5iDzm6qwLnQELZ0BEnEsECw8ZSWJW15st2rK3E9J/F3RQR eDJSNjiudetru55bk94mahfWKmDlHjrK2i+pBqVODm31wPNMz/I1/0iX0EvzD/wPuPvF EiXhd3OQaEP1UQTtaLrycSVLXU38P79DqaU7kcIDUSoPQl2ZJ3GS6QvdgX/0V4A/ENJM Td5A== 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=I4td+J/y8zL+0kbu/mhl0o3220/b/42t+qrkDa4+tfk=; b=rKbSgr3XErriwV9M0OnWllCEnV9u7S852+aYNtIUkUxzz/fwDmJmfMxwfTSY5Sg7tV ci2sa/ydj6BImO4l1NXmCTwe9Ogy9/e6igCm/nye2olGLjurAczAalrIzolV6sdLDUvY i5SixcFtto3InJF20upMFRvISgKyCXAkwyYgcvoY3zq1KJuxEqEYszT7oqvAyvnAqf3f mEfuFGCtvUawsQrGGFOtfk86U5QgS3OoEv4CpU1hX0VKJuVLVJF/Wq3cD8oSU+aW+eHn GX4xdJSf+hosODuq8aa1XMoaBX3BnfPjW/oLxrzowzlNrqGwQua2sO9yxH1aPccS0yES 9m7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=OYmGaBOx; 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 7si3968262otv.26.2019.12.04.11.52.45; Wed, 04 Dec 2019 11:52:57 -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=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=OYmGaBOx; 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 S1728159AbfLDTup (ORCPT + 99 others); Wed, 4 Dec 2019 14:50:45 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:46895 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727033AbfLDTup (ORCPT ); Wed, 4 Dec 2019 14:50:45 -0500 Received: by mail-wr1-f67.google.com with SMTP id z7so603569wrl.13 for ; Wed, 04 Dec 2019 11:50:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I4td+J/y8zL+0kbu/mhl0o3220/b/42t+qrkDa4+tfk=; b=OYmGaBOx0ht+4SVFQ8LShoz8qHD00vVsn9YoIESp213aFXGm3e4D9RewEL4BslOr2F h3yuRIZp7zblcpOsSfEMh1mlizj0lDpv7HuSC02848MWR4DMOcxC7wMy4amITCpB9NfG fGl1Kv3xlDMpTfBlwN9nuSZnBObMPbxfadAjbKRb9gVUAImnxShb6LQvE0ipnwt8qCO3 ZaMj5YSrN270/2qLQLNUbCVQwFELkxg3RqFqGrzBiUEPgqLRP15yixWkAjm3N6FFb2zs wdDeFVQvk9J1BvCObwBBdQ+0JoTShRSkfroLKxwXGpjGVcAn2vXPzERPI6ydfmz4/GBF hWaQ== 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=I4td+J/y8zL+0kbu/mhl0o3220/b/42t+qrkDa4+tfk=; b=Nh4lzl1lNHoH+ln5p0HOR2D37XK1M4LKujTN1kNi7F7uXCvGPrj+9eivxkIZs30DYK 9wI5/9eXBkLRObQrQ5swsG1kvKQco3ysqKCAfStpoh2uPY7OjfXyyOjnksulQ/kOwdB/ Z/6UKrSf7ZBwCYoa0vueKXiIribb/L1uuA511Gg6qZ4tbuGpF7/smtb3MdEB10NrcFni t0+K+JlGQBgxFuabeOYueal965obxrFf4UDnIn32hzGWAYf65knpmEHbkPlQZfWRHi9o nbrPst9JIH9ao1o17VeMRaB92Gay2UdfN8Mj5QGIBIanjyNR4et3cQZtjMFDj5YeZrOM IUIA== X-Gm-Message-State: APjAAAWvDViLRmSDOKE6LdnnIeb1N4iBQDwG/H78pTLDbuYeaDLplEh4 U4S9pTQ8M8/JV6ZBOxYPgpsYw4xWO37ix+eBtDcrEg== X-Received: by 2002:adf:f20b:: with SMTP id p11mr5792679wro.195.1575489043186; Wed, 04 Dec 2019 11:50:43 -0800 (PST) MIME-Version: 1.0 References: <20191203004043.174977-1-matthewgarrett@google.com> In-Reply-To: From: Andy Lutomirski Date: Wed, 4 Dec 2019 11:50:31 -0800 Message-ID: Subject: Re: [PATCH] [EFI,PCI] Allow disabling PCI busmastering on bridges during boot To: Matthew Garrett Cc: linux-efi , Ard Biesheuvel , X86 ML , linux-pci , LKML 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 Tue, Dec 3, 2019 at 11:41 AM Matthew Garrett wrote: > > On Tue, Dec 3, 2019 at 7:30 AM Andy Lutomirski wrote: > > > Would a similar patch apply to non-EFI boot? That is, in a BIOS boot, > > is busmastering on when the kernel is loaded? > > It's only relevant where firmware configures the IOMMU but then > removes that configuration before handing control to the OS. I'm not > aware of that happening anywhere other than EFI. Wouldn't it also be applicable in the much simpler case where the firmware hands over control with no IOMMU configured but also with the busmastering bit cleared. Does firmware do this? Does the kernel currently configure the iOMMU before enabling busmastering? --Andy