Linux-PCI Archive on
 help / color / Atom feed
From: Ard Biesheuvel <>
To: Matthew Garrett <>
Cc: Andy Lutomirski <>,
	linux-efi <>, X86 ML <>,
	linux-pci <>,
	LKML <>
Subject: Re: [PATCH] [EFI,PCI] Allow disabling PCI busmastering on bridges during boot
Date: Thu, 12 Dec 2019 16:46:32 +0100
Message-ID: <> (raw)
In-Reply-To: <>

On Wed, 4 Dec 2019 at 20:56, Matthew Garrett <> wrote:
> On Wed, Dec 4, 2019 at 11:50 AM Andy Lutomirski <> wrote:
> > 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?
> We already handle this case - the kernel doesn't activate busmastering
> until after it does IOMMU setup.

Build issues aside (which we already handled off list), I think we
should consider the following concerns I have about this patch:
- make it work on ARM (already done)
- make the cmdline option an efi=xxx one, this makes it obvious which
context this is active in
- I would prefer it if we could make it more obvious that this affects
PCI DMA only, other masters are unaffected by any of this.
- I don't think the presence of the IOMMU is entirely relevant - even
in the absence of an IOMMU, I would prefer bus mastering to be
disabled until the OS driver takes control. This is already part of
the EFI<->handover contract, but it makes sense to have this on top
just in case.
- What about integrated masters? On the systems I have access to,
there are a lot of DMA capable endpoints that sit on bus 0 without any
root port or PCI bridge in between
- Should we treat GOP producers differently? Or perhaps only if the
efifb address is known to be carved out of system memory?

If we come up with a good story here in terms of policy, we may be
able to enable this by default, which would be a win imo.

  reply index

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03  0:40 Matthew Garrett
2019-12-03  0:42 ` Matthew Garrett
2019-12-03 11:54   ` Ard Biesheuvel
2019-12-03 13:38     ` Laszlo Ersek
2019-12-03 19:36       ` Matthew Garrett
2019-12-03 19:40     ` Matthew Garrett
2019-12-04  7:11       ` Laszlo Ersek
2019-12-04 19:29         ` Matthew Garrett
2019-12-03 15:30 ` Andy Lutomirski
2019-12-03 16:33   ` Ard Biesheuvel
2019-12-03 19:41   ` Matthew Garrett
2019-12-04 19:50     ` Andy Lutomirski
2019-12-04 19:56       ` Matthew Garrett
2019-12-12 15:46         ` Ard Biesheuvel [this message]
2019-12-13 21:24           ` Matthew Garrett
2019-12-03 18:23 ` kbuild test robot
2019-12-05 13:04 ` kbuild test robot

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-PCI Archive on

Archives are clonable:
	git clone --mirror linux-pci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pci linux-pci/ \
	public-inbox-index linux-pci

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone