Re: [RFC PATCH v2 15/20] iommu/amd: AMD IOMMU support for memory encryption

2016-09-16 Thread Borislav Petkov
On Thu, Sep 15, 2016 at 11:57:41AM -0500, Tom Lendacky wrote: > If I do that, then I could put an #ifdef in the header to include the > asm/mem_encrypt.h if the memory encryption is configured, else set the > value to zero. Yeah, something along those lines... > I'll look into this. One immediate

Re: [RFC PATCH v2 15/20] iommu/amd: AMD IOMMU support for memory encryption

2016-09-15 Thread Tom Lendacky
On 09/14/2016 09:41 AM, Borislav Petkov wrote: > On Wed, Sep 14, 2016 at 08:45:44AM -0500, Tom Lendacky wrote: >> Currently, mem_encrypt.h only lives in the arch/x86 directory so it >> wouldn't be able to be included here without breaking other archs. > > I'm wondering if it would be simpler to mo

Re: [RFC PATCH v2 15/20] iommu/amd: AMD IOMMU support for memory encryption

2016-09-14 Thread Borislav Petkov
On Wed, Sep 14, 2016 at 08:45:44AM -0500, Tom Lendacky wrote: > Currently, mem_encrypt.h only lives in the arch/x86 directory so it > wouldn't be able to be included here without breaking other archs. I'm wondering if it would be simpler to move only sme_me_mask to an arch-agnostic header just so

Re: [RFC PATCH v2 15/20] iommu/amd: AMD IOMMU support for memory encryption

2016-09-14 Thread Tom Lendacky
On 09/12/2016 06:45 AM, Borislav Petkov wrote: > On Mon, Aug 22, 2016 at 05:38:20PM -0500, Tom Lendacky wrote: >> Add support to the AMD IOMMU driver to set the memory encryption mask if >> memory encryption is enabled. >> >> Signed-off-by: Tom Lendacky >> --- >> arch/x86/include/asm/mem_encrypt.

Re: [RFC PATCH v2 15/20] iommu/amd: AMD IOMMU support for memory encryption

2016-09-12 Thread Borislav Petkov
On Mon, Aug 22, 2016 at 05:38:20PM -0500, Tom Lendacky wrote: > Add support to the AMD IOMMU driver to set the memory encryption mask if > memory encryption is enabled. > > Signed-off-by: Tom Lendacky > --- > arch/x86/include/asm/mem_encrypt.h |2 ++ > arch/x86/mm/mem_encrypt.c |

[RFC PATCH v2 15/20] iommu/amd: AMD IOMMU support for memory encryption

2016-08-22 Thread Tom Lendacky
Add support to the AMD IOMMU driver to set the memory encryption mask if memory encryption is enabled. Signed-off-by: Tom Lendacky --- arch/x86/include/asm/mem_encrypt.h |2 ++ arch/x86/mm/mem_encrypt.c |5 + drivers/iommu/amd_iommu.c | 10 ++ 3 files chan