Re: [PATCH v6 26/34] iommu/amd: Allow the AMD IOMMU to work with memory encryption

2017-06-15 Thread Konrad Rzeszutek Wilk
On June 15, 2017 11:33:22 AM EDT, Borislav Petkov wrote: >On Thu, Jun 15, 2017 at 09:59:45AM -0500, Tom Lendacky wrote: >> Actually the detection routine, amd_iommu_detect(), is part of the >> IOMMU_INIT_FINISH macro support which is called early through >mm_init() >> from start_kernel() and that

[PATCH 4.11 05/13] efi: Fix boot panic because of invalid BGRT image address

2017-06-15 Thread Greg Kroah-Hartman
4.11-stable review patch. If anyone has any objections, please let me know. -- From: Dave Young commit 792ef14df5c585c19b2831673a077504a09e5203 upstream. Maniaxx reported a kernel boot crash in the EFI code, which I emulated by using same invalid phys addr in code: BUG: una

Re: [PATCH v6 30/34] x86/mm, kexec: Allow kexec to be used with SME

2017-06-15 Thread Tom Lendacky
On 6/15/2017 5:03 AM, Borislav Petkov wrote: On Wed, Jun 07, 2017 at 02:18:27PM -0500, Tom Lendacky wrote: Provide support so that kexec can be used to boot a kernel when SME is enabled. Support is needed to allocate pages for kexec without encryption. This is needed in order to be able to reb

Re: [PATCH v6 26/34] iommu/amd: Allow the AMD IOMMU to work with memory encryption

2017-06-15 Thread Tom Lendacky
On 6/15/2017 10:33 AM, Borislav Petkov wrote: On Thu, Jun 15, 2017 at 09:59:45AM -0500, Tom Lendacky wrote: Actually the detection routine, amd_iommu_detect(), is part of the IOMMU_INIT_FINISH macro support which is called early through mm_init() from start_kernel() and that routine is called be

Re: [PATCH v6 26/34] iommu/amd: Allow the AMD IOMMU to work with memory encryption

2017-06-15 Thread Borislav Petkov
On Thu, Jun 15, 2017 at 09:59:45AM -0500, Tom Lendacky wrote: > Actually the detection routine, amd_iommu_detect(), is part of the > IOMMU_INIT_FINISH macro support which is called early through mm_init() > from start_kernel() and that routine is called before init_amd(). Ah, we do that there too:

Re: [PATCH v6 26/34] iommu/amd: Allow the AMD IOMMU to work with memory encryption

2017-06-15 Thread Tom Lendacky
On 6/15/2017 4:41 AM, Borislav Petkov wrote: On Wed, Jun 14, 2017 at 03:40:28PM -0500, Tom Lendacky wrote: I was trying to keep all the logic for it here in the SME related files rather than put it in the iommu code itself. But it is easy enough to move if you think it's worth it. Yes please -

Re: [PATCH v6 25/34] swiotlb: Add warnings for use of bounce buffers with SME

2017-06-15 Thread Tom Lendacky
On 6/15/2017 4:08 AM, Borislav Petkov wrote: On Wed, Jun 14, 2017 at 02:49:02PM -0500, Tom Lendacky wrote: I guess I don't need the sme_active() check since the second part of the if statement can only ever be true if SME is active (since mask is unsigned). ... and you can define sme_me_mask a

Re: [PATCH v6 30/34] x86/mm, kexec: Allow kexec to be used with SME

2017-06-15 Thread Borislav Petkov
On Wed, Jun 07, 2017 at 02:18:27PM -0500, Tom Lendacky wrote: > Provide support so that kexec can be used to boot a kernel when SME is > enabled. > > Support is needed to allocate pages for kexec without encryption. This > is needed in order to be able to reboot in the kernel in the same manner >

Re: [PATCH v6 29/34] kvm: x86: svm: Support Secure Memory Encryption within KVM

2017-06-15 Thread Borislav Petkov
On Wed, Jun 07, 2017 at 02:18:15PM -0500, Tom Lendacky wrote: > Update the KVM support to work with SME. The VMCB has a number of fields > where physical addresses are used and these addresses must contain the > memory encryption mask in order to properly access the encrypted memory. > Also, use th

Re: [PATCH v6 26/34] iommu/amd: Allow the AMD IOMMU to work with memory encryption

2017-06-15 Thread Borislav Petkov
On Wed, Jun 14, 2017 at 03:40:28PM -0500, Tom Lendacky wrote: > I was trying to keep all the logic for it here in the SME related files > rather than put it in the iommu code itself. But it is easy enough to > move if you think it's worth it. Yes please - the less needlessly global symbols, the be

Re: [PATCH v6 25/34] swiotlb: Add warnings for use of bounce buffers with SME

2017-06-15 Thread Borislav Petkov
On Wed, Jun 14, 2017 at 02:49:02PM -0500, Tom Lendacky wrote: > I guess I don't need the sme_active() check since the second part of the > if statement can only ever be true if SME is active (since mask is > unsigned). ... and you can define sme_me_mask as an u64 directly (it is that already, prac

Re: [PATCH 4.11 049/150] efi/bgrt: Skip efi_bgrt_init() in case of non-EFI boot

2017-06-15 Thread Greg Kroah-Hartman
On Thu, Jun 15, 2017 at 01:34:38AM +0200, Maniaxx wrote: > On 12.06.2017 at 17:24 wrote Greg Kroah-Hartman: > > 4.11-stable review patch. If anyone has any objections, please let me know. > > > > -- > > > > From: Dave Young > > > > commit 7425826f4f7ac60f2538b06a7f0a5d100640515