From: Ard Biesheuvel <firstname.lastname@example.org> To: Matthew Garrett <email@example.com> Cc: Andy Lutomirski <firstname.lastname@example.org>, linux-efi <email@example.com>, X86 ML <firstname.lastname@example.org>, linux-pci <email@example.com>, LKML <firstname.lastname@example.org> Subject: Re: [PATCH] [EFI,PCI] Allow disabling PCI busmastering on bridges during boot Date: Thu, 12 Dec 2019 16:46:32 +0100 Message-ID: <CAKv+Gu-7H7AmMGk8_safU83KZZiJJpQ4X+o7V9Pv24AOh3g5ug@mail.gmail.com> (raw) In-Reply-To: <CACdnJuvTR2r_myJX2bQ8XTDw_HxM-EgqhVLaUJVCa+VQS+6Qrg@mail.gmail.com> On Wed, 4 Dec 2019 at 20:56, Matthew Garrett <email@example.com> wrote: > > On Wed, Dec 4, 2019 at 11:50 AM Andy Lutomirski <firstname.lastname@example.org> 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.
next prev parent 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: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAKv+Gu-7H7AmMGk8_safU83KZZiJJpQ4X+o7V9Pv24AOh3g5ug@mail.gmail.com \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Linux-PCI Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-pci/0 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/ https://lore.kernel.org/linux-pci \ firstname.lastname@example.org public-inbox-index linux-pci Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pci AGPL code for this site: git clone https://public-inbox.org/public-inbox.git