Re: [PATCH] iommu/amd: fix sg->dma_address for sg->offset bigger than PAGE_SIZE

2019-03-12 Thread Alexander Duyck
On Tue, 2019-03-12 at 08:08 +0100, Stanislaw Gruszka wrote: > On Mon, Mar 11, 2019 at 08:47:44AM -0700, Alexander Duyck wrote: > > > drivers/iommu/amd_iommu.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/iommu/amd_iommu.c

Re: [PATCH] iommu/amd: fix sg->dma_address for sg->offset bigger than PAGE_SIZE

2019-03-12 Thread Stanislaw Gruszka
On Mon, Mar 11, 2019 at 08:47:44AM -0700, Alexander Duyck wrote: > > drivers/iommu/amd_iommu.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c > > index 6b0760dafb3e..949621f33624 100644 > > ---

Re: [PATCH] iommu/amd: fix sg->dma_address for sg->offset bigger than PAGE_SIZE

2019-03-11 Thread Alexander Duyck
On Mon, 2019-03-11 at 10:03 +0100, Stanislaw Gruszka wrote: > Take into account that sg->offset can be bigger than PAGE_SIZE when > setting segment sg->dma_address. Otherwise sg->dma_address will point > at diffrent page, what makes DMA not possible with erros like this: > > xhci_hcd

[PATCH] iommu/amd: fix sg->dma_address for sg->offset bigger than PAGE_SIZE

2019-03-11 Thread Stanislaw Gruszka
Take into account that sg->offset can be bigger than PAGE_SIZE when setting segment sg->dma_address. Otherwise sg->dma_address will point at diffrent page, what makes DMA not possible with erros like this: xhci_hcd :38:00.3: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x