Re: [PATCH 1/1] iommu/vt-d: Fix dmar pte read access not set error

2019-12-12 Thread Jerry Snitselaar
On Thu Dec 12 19, Lu Baolu wrote: Hi, On 12/12/19 9:49 AM, Jerry Snitselaar wrote: On Wed Dec 11 19, Lu Baolu wrote: If the default DMA domain of a group doesn't fit a device, it will still sit in the group but use a private identity domain. When map/unmap/iova_to_phys come through iommu API,

Re: [PATCH] iommu/vt-d: Set ISA bridge reserved region as relaxable

2019-12-12 Thread Jerry Snitselaar
On Wed Dec 11 19, Alex Williamson wrote: Commit d850c2ee5fe2 ("iommu/vt-d: Expose ISA direct mapping region via iommu_get_resv_regions") created a direct-mapped reserved memory region in order to replace the static identity mapping of the ISA address space, where the latter was then removed in

[PATCH] iommu/vt-d: Allocate reserved region for ISA with correct permission

2019-12-12 Thread Jerry Snitselaar
Currently the reserved region for ISA is allocated with no permissions. If a dma domain is being used, mapping this region will fail. Set the permissions to DMA_PTE_READ|DMA_PTE_WRITE. Cc: Joerg Roedel Cc: Lu Baolu Cc: iommu@lists.linux-foundation.org Cc: sta...@vger.kernel.org # v5.3+ Fixes:

Re: [PATCH 1/1] iommu/vt-d: Fix dmar pte read access not set error

2019-12-12 Thread Lu Baolu
Hi, On 12/13/19 11:16 AM, Jerry Snitselaar wrote: On Thu Dec 12 19, Jerry Snitselaar wrote: On Fri Dec 13 19, Lu Baolu wrote: Hi, On 12/13/19 8:30 AM, Jerry Snitselaar wrote: On Thu Dec 12 19, Lu Baolu wrote: Hi, On 12/12/19 9:49 AM, Jerry Snitselaar wrote: On Wed Dec 11 19, Lu Baolu

Re: [PATCH 1/1] iommu/vt-d: Fix dmar pte read access not set error

2019-12-12 Thread Jerry Snitselaar
On Thu Dec 12 19, Jerry Snitselaar wrote: On Fri Dec 13 19, Lu Baolu wrote: Hi, On 12/13/19 8:30 AM, Jerry Snitselaar wrote: On Thu Dec 12 19, Lu Baolu wrote: Hi, On 12/12/19 9:49 AM, Jerry Snitselaar wrote: On Wed Dec 11 19, Lu Baolu wrote: If the default DMA domain of a group doesn't

Re: [PATCH 1/1] iommu/vt-d: Fix dmar pte read access not set error

2019-12-12 Thread Jerry Snitselaar
On Fri Dec 13 19, Lu Baolu wrote: Hi, On 12/13/19 8:30 AM, Jerry Snitselaar wrote: On Thu Dec 12 19, Lu Baolu wrote: Hi, On 12/12/19 9:49 AM, Jerry Snitselaar wrote: On Wed Dec 11 19, Lu Baolu wrote: If the default DMA domain of a group doesn't fit a device, it will still sit in the group

Re: [PATCH 1/1] iommu/vt-d: Fix dmar pte read access not set error

2019-12-12 Thread Lu Baolu
Hi, On 12/13/19 8:30 AM, Jerry Snitselaar wrote: On Thu Dec 12 19, Lu Baolu wrote: Hi, On 12/12/19 9:49 AM, Jerry Snitselaar wrote: On Wed Dec 11 19, Lu Baolu wrote: If the default DMA domain of a group doesn't fit a device, it will still sit in the group but use a private identity domain.

Re: [PATCH 1/1] iommu/vt-d: Fix dmar pte read access not set error

2019-12-12 Thread Jerry Snitselaar
On Thu Dec 12 19, Lu Baolu wrote: Hi, On 12/12/19 9:49 AM, Jerry Snitselaar wrote: On Wed Dec 11 19, Lu Baolu wrote: If the default DMA domain of a group doesn't fit a device, it will still sit in the group but use a private identity domain. When map/unmap/iova_to_phys come through iommu API,

Re: [bug] __blk_mq_run_hw_queue suspicious rcu usage

2019-12-12 Thread David Rientjes via iommu
On Thu, 28 Nov 2019, Christoph Hellwig wrote: > > So we're left with making dma_pool_alloc(GFP_ATOMIC) actually be atomic > > even when the DMA needs to be unencrypted for SEV. Christoph's suggestion > > was to wire up dmapool in kernel/dma/remap.c for this. Is that necessary > > to be done

Re: [PATCH] iommu/vt-d: Set ISA bridge reserved region as relaxable

2019-12-12 Thread Alex Williamson
On Thu, 12 Dec 2019 09:49:37 +0100 Auger Eric wrote: > Hi Alex, > > On 12/11/19 9:28 PM, Alex Williamson wrote: > > Commit d850c2ee5fe2 ("iommu/vt-d: Expose ISA direct mapping region via > > iommu_get_resv_regions") created a direct-mapped reserved memory region > > in order to replace the

Re: [PATCH v4 8/8] linux/log2.h: Use roundup/dow_pow_two() on 64bit calculations

2019-12-12 Thread Nicolas Saenz Julienne
On Thu, 2019-12-05 at 14:38 -0600, Bjorn Helgaas wrote: > The subject contains a couple typos: it's missing "of" and it's > missing the "n" on "down". Noted > > On Tue, Dec 03, 2019 at 12:47:41PM +0100, Nicolas Saenz Julienne wrote: > > The function now is safe to use while expecting a 64bit

Re: [PATCH v4 7/8] linux/log2.h: Fix 64bit calculations in roundup/down_pow_two()

2019-12-12 Thread Nicolas Saenz Julienne
On Thu, 2019-12-05 at 16:30 -0600, Bjorn Helgaas wrote: > You got the "n" on "down" in the subject, but still missing "of" ;) Yes, sorry about that, I tend to re-read what I meant to say instead of what it's actually written. > On Tue, Dec 03, 2019 at 12:47:40PM +0100, Nicolas Saenz Julienne

Re: [PATCH v4 7/8] linux/log2.h: Fix 64bit calculations in roundup/down_pow_two()

2019-12-12 Thread Nicolas Saenz Julienne
Hi Robin, On Thu, 2019-12-05 at 17:48 +, Robin Murphy wrote: > On 03/12/2019 11:47 am, Nicolas Saenz Julienne wrote: > > Some users need to make sure their rounding function accepts and returns > > 64bit long variables regardless of the architecture. Sadly > > roundup/rounddown_pow_two()

Re: [PATCH] iommu/vt-d: Set ISA bridge reserved region as relaxable

2019-12-12 Thread Auger Eric
Hi Alex, On 12/11/19 9:28 PM, Alex Williamson wrote: > Commit d850c2ee5fe2 ("iommu/vt-d: Expose ISA direct mapping region via > iommu_get_resv_regions") created a direct-mapped reserved memory region > in order to replace the static identity mapping of the ISA address > space, where the latter