Date: Sun, 3 Nov 2024 18:02:38 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Mark Johnston <markj@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0f5116d7efe3 - main - AMD IOMMU driver Message-ID: <Zyeenp2GsurYlw04@kib.kiev.ua> In-Reply-To: <ZyeZRlgfPKb78NA5@nuc> References: <202411022346.4A2NkeBT097606@gitrepo.freebsd.org> <ZyeZRlgfPKb78NA5@nuc>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Nov 03, 2024 at 10:39:50AM -0500, Mark Johnston wrote: > On Sat, Nov 02, 2024 at 11:46:40PM +0000, Konstantin Belousov wrote: > > The branch main has been updated by kib: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=0f5116d7efe33c81f0b24b56eec78af37898f500 > > > > commit 0f5116d7efe33c81f0b24b56eec78af37898f500 > > Author: Konstantin Belousov <kib@FreeBSD.org> > > AuthorDate: 2024-05-12 10:20:11 +0000 > > Commit: Konstantin Belousov <kib@FreeBSD.org> > > CommitDate: 2024-11-02 23:45:40 +0000 > > > > AMD IOMMU driver > > > > This driver is functionally equivalent to the in-tree Intel DMAR code. > > It handles busdma and interrupt remapping from the host OS. There is no > > integration with bhyve, and the stub iommu drivers in bhyve code cannot > > coexist with this driver (planned). > > > > The biggest architectural problem with the code is that the AMD IOMMU > > units are enumerated as PCIe-attached security devices, which is much > > later after HPET and IOAPIC drivers attached and actived interrupts. > > Because of this, HPET FSB interrupts and IOAPIC interrupts are always > > identity-mapped. > > > > The code is of late alpha quality. By default the driver is disabled. > > To enable for testing, set in loader.conf: > > hw.amdiommu.enable=1 > > hw.iommu.dma=1 <- to enable iommu busdma > > hw.iommu.ir=1 <- to enable interrupt remapping > > > > Discussed with: emaste > > Sponsored by: Advanced Micro Devices (AMD) > > Sponsored by: The FreeBSD Foundation > > MFC after: 1 week > > Differential revision: https://reviews.freebsd.org/D47256 > > This appears to break loading of vmm.ko, as sys/amd64/vmm/amd/amdiommu.c > already defines a driver called "amdiommu". Perhaps the module in vmm > should be renamed to amdviiommu or so? Perhaps. Will you commit this yourself?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Zyeenp2GsurYlw04>