Re: [PATCH] dma-mapping: do not mapping module memory

2019-12-01 Thread Christoph Hellwig
On Fri, Nov 29, 2019 at 07:03:40PM +0800, lijiazi wrote: > On ARM, x86_64, sparc64 platform, virt_to_page only convert a > _valid_ virtual address to struct page *, virt_addr_valid(x) > indicates whether a virtual address is valid. If ptr is point > to a static variable in module area, virt_to_page

Re: dmar pte read access not set error messages on hp dl388 gen8 systems

2019-12-01 Thread Jerry Snitselaar
On Mon Dec 02 19, Lu Baolu wrote: Hi, On 12/2/19 2:34 PM, Jerry Snitselaar wrote: We are seeing DMAR PTE read access not set errors when booting a kernel with default passthrough, both with a test kernel and with a 5.4.0 kernel. Previously we would see a number of identity mappings being set re

Re: dmar pte read access not set error messages on hp dl388 gen8 systems

2019-12-01 Thread Lu Baolu
Hi, On 12/2/19 2:34 PM, Jerry Snitselaar wrote: We are seeing DMAR PTE read access not set errors when booting a kernel with default passthrough, both with a test kernel and with a 5.4.0 kernel. Previously we would see a number of identity mappings being set related to the rmrrs, and now they ar

dmar pte read access not set error messages on hp dl388 gen8 systems

2019-12-01 Thread Jerry Snitselaar
We are seeing DMAR PTE read access not set errors when booting a kernel with default passthrough, both with a test kernel and with a 5.4.0 kernel. Previously we would see a number of identity mappings being set related to the rmrrs, and now they aren't seen and we get the dmar pte errors as device

Re: kernel BUG at drivers/iommu/intel-iommu.c:667!

2019-12-01 Thread Anand Misra
[+iommu_list] Application isn't aware of hugepage but a userspace (lower) level stack is aware of the type of memory being allocated on behalf of application, which in turn communicates w/ driver via ioctl. I'm trying to make it more agnostic by using dma_map_sg() when multiple GBs are required by

Re: kernel BUG at drivers/iommu/intel-iommu.c:667!

2019-12-01 Thread Lu Baolu
Hi, On 12/2/19 9:46 AM, Anand Misra wrote: Hello: I'm in process of adding iommu support in my driver for a PCIe device. The device doesn't publish ACS/ATS via its config space. I've following config: Linux cmdline: "intel-iommu=on iommu=pt vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_a

Re: kernel BUG at drivers/iommu/intel-iommu.c:667!

2019-12-01 Thread Anand Misra
Correction: 1. get_user_pages_fast() for each hugepage start address for one page 2. sg_alloc_table_from_pages() using page array from #1 3. dma_map_sg() for num hugepages using sgt from #2 On Sun, Dec 1, 2019 at 5:46 PM Anand Misra wrote: > Hello: > > I'm in process of adding iommu support

kernel BUG at drivers/iommu/intel-iommu.c:667!

2019-12-01 Thread Anand Misra
Hello: I'm in process of adding iommu support in my driver for a PCIe device. The device doesn't publish ACS/ATS via its config space. I've following config: Linux cmdline: "intel-iommu=on iommu=pt vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream" Centos kernel: 3.10.0-1062

Re: [PATCH v2] iommu/amd: Disable IOMMU on Stoney Ridge systems

2019-12-01 Thread Lucas Stach
Am Freitag, den 29.11.2019, 22:21 +0800 schrieb Kai-Heng Feng: > Serious screen flickering when Stoney Ridge outputs to a 4K monitor. > > According to Alex Deucher, IOMMU isn't enabled on Windows, so let's do > the same here to avoid screen flickering on 4K monitor. This doesn't seem like a good