Re: Partial BAR Address Allocation

2017-02-22 Thread Bjorn Helgaas
[+cc Joerg, iommu list] On Wed, Feb 22, 2017 at 03:44:53PM -0500, Sinan Kaya wrote: > On 2/22/2017 1:44 PM, Bjorn Helgaas wrote: > > There is no way for a driver to say "I only need this memory BAR and > > not the other ones." The reason is because the PCI_COMMAND_MEMORY bit > > enables *all*

Re: [RFC PATCH v4 16/28] x86: Add support for changing memory encryption attribute

2017-02-22 Thread Borislav Petkov
On Thu, Feb 16, 2017 at 09:45:35AM -0600, Tom Lendacky wrote: > Add support for changing the memory encryption attribute for one or more > memory pages. "This will be useful when we, , for example." > Signed-off-by: Tom Lendacky > --- >

Re: [RFC PATCH v4 10/28] x86: Insure that boot memory areas are mapped properly

2017-02-22 Thread Tom Lendacky
On 2/20/2017 1:45 PM, Borislav Petkov wrote: On Thu, Feb 16, 2017 at 09:44:11AM -0600, Tom Lendacky wrote: The boot data and command line data are present in memory in a decrypted state and are copied early in the boot process. The early page fault support will map these areas as encrypted, so

Re: [RFC PATCH v4 07/28] x86: Provide general kernel support for memory encryption

2017-02-22 Thread Dave Hansen
On 02/16/2017 07:43 AM, Tom Lendacky wrote: > ) > @@ -673,7 +683,7 @@ static inline unsigned long pgd_page_vaddr(pgd_t pgd) > * Currently stuck as a macro due to indirect forward reference to > * linux/mmzone.h's __section_mem_map_addr() definition: > */ > -#define pgd_page(pgd)

Re: [RFC PATCH v4 07/28] x86: Provide general kernel support for memory encryption

2017-02-22 Thread Dave Hansen
On 02/16/2017 07:43 AM, Tom Lendacky wrote: > static inline unsigned long pte_pfn(pte_t pte) > { > - return (pte_val(pte) & PTE_PFN_MASK) >> PAGE_SHIFT; > + return (pte_val(pte) & ~sme_me_mask & PTE_PFN_MASK) >> PAGE_SHIFT; > } > > static inline unsigned long pmd_pfn(pmd_t pmd) > {

Re: [RFC PATCH v4 07/28] x86: Provide general kernel support for memory encryption

2017-02-22 Thread Tom Lendacky
On 2/20/2017 12:38 PM, Borislav Petkov wrote: On Thu, Feb 16, 2017 at 09:43:32AM -0600, Tom Lendacky wrote: Adding general kernel support for memory encryption includes: - Modify and create some page table macros to include the Secure Memory Encryption (SME) memory encryption mask - Modify

Re: [PATCH v1 1/6] iommu/dmar: Fix crash on boot when DMAR is disabled

2017-02-22 Thread Andy Shevchenko
On Wed, 2017-02-22 at 12:26 +0100, Joerg Roedel wrote: > Hi Andy, > > On Wed, Feb 15, 2017 at 04:42:21PM +0200, Andy Shevchenko wrote: > > By default CONFIG_INTEL_IOMMU_DEFAULT_ON is not set and thus > > dmar_disabled variable is set. > > > > Intel IOMMU driver based on above doesn't set

Re: [RFC PATCH v4 09/28] x86: Add support for early encryption/decryption of memory

2017-02-22 Thread Tom Lendacky
On 2/20/2017 12:22 PM, Borislav Petkov wrote: On Thu, Feb 16, 2017 at 09:43:58AM -0600, Tom Lendacky wrote: Add support to be able to either encrypt or decrypt data in place during the early stages of booting the kernel. This does not change the memory encryption attribute - it is used for

Re: [RFC PATCH v4 08/28] x86: Extend the early_memremap support with additional attrs

2017-02-22 Thread Tom Lendacky
On 2/20/2017 9:43 AM, Borislav Petkov wrote: On Thu, Feb 16, 2017 at 09:43:48AM -0600, Tom Lendacky wrote: Add to the early_memremap support to be able to specify encrypted and early_memremap() Please append "()" to function names in your commit messages text. decrypted mappings with and

RE: [PATCH 2/2] iommu: add qcom_iommu

2017-02-22 Thread Sricharan
Hi Rob, <..> >>>+++ b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt >>>@@ -0,0 +1,45 @@ >>>+* QCOM IOMMU Implementation >>>+ >>>+Qualcomm "B" family devices which are not compatible with arm-smmu have >>>+a similar looking IOMMU but without access to the global register space. >>>+This

[git pull] IOMMU Fix for Linux v4.11-rc0

2017-02-22 Thread Joerg Roedel
Hi Linus, The following changes since commit ebb4949eb32ff500602f960525592fc4e614c5a7: Merge tag 'iommu-updates-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu (2017-02-20 16:42:43 -0800) are available in the git repository at:

Re: [PATCH 2/2] iommu: add qcom_iommu

2017-02-22 Thread Rob Clark
On Wed, Feb 22, 2017 at 4:31 AM, Sricharan wrote: > Hi Rob, > >>diff --git a/Documentation/devicetree/bindings/iommu/qcom,iommu.txt >>b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt >>new file mode 100644 >>index 000..78a8d65 >>--- /dev/null >>+++

Re: [RFC PATCH v4 07/28] x86: Provide general kernel support for memory encryption

2017-02-22 Thread Borislav Petkov
On Tue, Feb 21, 2017 at 11:18:08AM -0600, Tom Lendacky wrote: > It's the latter. It's really only used for working with values that > will either be written to or read from cr3. I'll add some comments > around the macros as well as expand on it in the commit message. Ok, that makes sense.

Re: [bug report] iommu/arm-smmu: Make use of the iommu_register interface

2017-02-22 Thread Joerg Roedel
On Wed, Feb 22, 2017 at 11:26:48AM +, Robin Murphy wrote: > The pointer isn't cleared because the whole fwspec is freed on the very > next line. You are right, stupid me :/ Sorry for the noise. Joerg ___ iommu mailing list

Re: [bug report] iommu/arm-smmu: Make use of the iommu_register interface

2017-02-22 Thread Robin Murphy
On 22/02/17 11:00, Joerg Roedel wrote: > Hi Dan, > > thanks for the report! There are more bogus things going on here. > > On Wed, Feb 15, 2017 at 11:36:48AM +0300, Dan Carpenter wrote: >> The patch 9648cbc9625b: "iommu/arm-smmu: Make use of the >> iommu_register interface" from Feb 1, 2017,

Re: [PATCH v1 1/6] iommu/dmar: Fix crash on boot when DMAR is disabled

2017-02-22 Thread Joerg Roedel
Hi Andy, On Wed, Feb 15, 2017 at 04:42:21PM +0200, Andy Shevchenko wrote: > By default CONFIG_INTEL_IOMMU_DEFAULT_ON is not set and thus > dmar_disabled variable is set. > > Intel IOMMU driver based on above doesn't set intel_iommu_enabled > variable. > > The commit b0119e870837 ("iommu:

Re: [bug report] iommu/arm-smmu: Make use of the iommu_register interface

2017-02-22 Thread Joerg Roedel
Hi Dan, thanks for the report! There are more bogus things going on here. On Wed, Feb 15, 2017 at 11:36:48AM +0300, Dan Carpenter wrote: > The patch 9648cbc9625b: "iommu/arm-smmu: Make use of the > iommu_register interface" from Feb 1, 2017, leads to the following > Smatch complaint: > >

RE: [PATCH 2/2] iommu: add qcom_iommu

2017-02-22 Thread Sricharan
Hi Rob, >diff --git a/Documentation/devicetree/bindings/iommu/qcom,iommu.txt >b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt >new file mode 100644 >index 000..78a8d65 >--- /dev/null >+++ b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt >@@ -0,0 +1,45 @@ >+* QCOM IOMMU