Re: [PATCH] Add IOMMU support for Intel VT-d and AMD-Vi

2020-10-13 Thread Mark Kettenis
> Date: Thu, 8 Oct 2020 00:34:28 -0500 > From: Jordan Hargrave > > Ok updated the new changes. I think this is good enough for further cleanup in the tree now. Builds all thr amd64 kernels, doesn't break i386 and arm64 GENERIC.MP. However, I think acpidmar(4) shouldn't be enabled yet until

Re: [PATCH] Add IOMMU support for Intel VT-d and AMD-Vi

2020-10-07 Thread Jordan Hargrave
Ok updated the new changes. On Mon, Oct 05, 2020 at 09:54:02PM +0200, Mark Kettenis wrote: > > Date: Thu, 17 Sep 2020 20:54:51 -0500 > > From: Jordan Hargrave > > Cc: ma...@peereboom.org, kette...@openbsd.org, tech@openbsd.org, > > d...@openbsd.org, j...@openbsd.org > > Content-Type:

Re: [PATCH] Add IOMMU support for Intel VT-d and AMD-Vi

2020-10-05 Thread Mark Kettenis
> Date: Thu, 17 Sep 2020 20:54:51 -0500 > From: Jordan Hargrave > Cc: ma...@peereboom.org, kette...@openbsd.org, tech@openbsd.org, > d...@openbsd.org, j...@openbsd.org > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > > Ok made more changes > > On Mon, Sep

Re: [PATCH] Add IOMMU support for Intel VT-d and AMD-Vi

2020-10-04 Thread Jordan Hargrave
Ping... still need more eyes on this This is the IOMMU code for VT-d and AMD Vi implementation It overrides the DMA Tag for each device and assigns it to a protected domain On Thu, Sep 17, 2020 at 08:54:51PM -0500, Jordan Hargrave wrote: > Ok made more changes > > On Mon, Sep 14, 2020 at

Re: [PATCH] Add IOMMU support for Intel VT-d and AMD-Vi

2020-09-17 Thread Jordan Hargrave
Ok made more changes On Mon, Sep 14, 2020 at 08:19:18PM +0200, Mark Kettenis wrote: > > Date: Tue, 8 Sep 2020 21:43:39 -0500 > > From: Jordan Hargrave > > > > Made changes for the iommu_readq -> iommu_read_8 and also now > > dynamically allocate the hwdte for AMD IOMMU. > > Some more

Re: [PATCH] Add IOMMU support for Intel VT-d and AMD-Vi

2020-09-14 Thread Mark Kettenis
> Date: Tue, 8 Sep 2020 21:43:39 -0500 > From: Jordan Hargrave > > Made changes for the iommu_readq -> iommu_read_8 and also now > dynamically allocate the hwdte for AMD IOMMU. Some more bits... > On Fri, Sep 04, 2020 at 09:17:18PM +0200, Mark Kettenis wrote: > > > Date: Fri, 4 Sep 2020

Re: [PATCH] Add IOMMU support for Intel VT-d and AMD-Vi

2020-09-08 Thread Jordan Hargrave
Made changes for the iommu_readq -> iommu_read_8 and also now dynamically allocate the hwdte for AMD IOMMU. On Fri, Sep 04, 2020 at 09:17:18PM +0200, Mark Kettenis wrote: > > Date: Fri, 4 Sep 2020 00:50:44 -0500 > > From: Jordan Hargrave > > A few hints below... > > > > > + > > > > +/* Page

Re: [PATCH] Add IOMMU support for Intel VT-d and AMD-Vi

2020-09-04 Thread Mark Kettenis
> Date: Fri, 4 Sep 2020 00:50:44 -0500 > From: Jordan Hargrave A few hints below... > > > + > > > +/* Page Table Entry per domain */ > > > +static struct ivhd_dte hwdte[65536] __aligned(PAGE_SIZE); > > > + > > > +/* Alias mapping */ > > > +#define SID_INVALID 0x8000L > > > +static uint32_t

Re: [PATCH] Add IOMMU support for Intel VT-d and AMD-Vi

2020-09-03 Thread Jordan Hargrave
On Thu, Sep 03, 2020 at 09:06:59PM +0200, Mark Kettenis wrote: > > Date: Tue, 1 Sep 2020 17:20:19 -0500 > > From: Jordan Hargrave > > > > [PATCH] Add IOMMU support for Intel VT-d and AMD Vi > > > > This hooks each pci device and overrides bus_dmamap_xx

Re: [PATCH] Add IOMMU support for Intel VT-d and AMD-Vi

2020-09-03 Thread Mark Kettenis
> Date: Tue, 1 Sep 2020 17:20:19 -0500 > From: Jordan Hargrave > > [PATCH] Add IOMMU support for Intel VT-d and AMD Vi > > This hooks each pci device and overrides bus_dmamap_xxx to issue > remap of DMA requests to virtual DMA space. It protects devices > from issuin

Re: [PATCH] Add IOMMU support for Intel VT-d and AMD-Vi

2020-09-01 Thread Jordan Hargrave
Oh good catch thanks. Weird, it does compile! From: Daniel Dickman Sent: Tuesday, September 1, 2020 11:23 PM To: Jordan Hargrave Cc: tech@openbsd.org Subject: Re: [PATCH] Add IOMMU support for Intel VT-d and AMD-Vi > [PATCH] Add IOMMU support for Intel V

Re: [PATCH] Add IOMMU support for Intel VT-d and AMD-Vi

2020-09-01 Thread Daniel Dickman
> [PATCH] Add IOMMU support for Intel VT-d and AMD Vi > > This hooks each pci device and overrides bus_dmamap_xxx to issue > remap of DMA requests to virtual DMA space. It protects devices > from issuing I/O requests to memory in the system that is outside > the requested DMA

[PATCH] Add IOMMU support for Intel VT-d and AMD-Vi

2020-09-01 Thread Jordan Hargrave
[PATCH] Add IOMMU support for Intel VT-d and AMD Vi This hooks each pci device and overrides bus_dmamap_xxx to issue remap of DMA requests to virtual DMA space. It protects devices from issuing I/O requests to memory in the system that is outside the requested DMA space. --- sys/arch/amd64/conf