From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [PATCH v7 24/36] x86, swiotlb: Add memory encryption support Date: Wed, 21 Jun 2017 11:54:48 +0200 Message-ID: <20170621095448.6c52kp2eves5uyzy@pd.tnic> References: <20170616184947.18967.84890.stgit@tlendack-t1.amdoffice.net> <20170616185423.18967.19605.stgit@tlendack-t1.amdoffice.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <20170616185423.18967.19605.stgit@tlendack-t1.amdoffice.net> Sender: owner-linux-mm@kvack.org To: Tom Lendacky Cc: linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, xen-devel@lists.xen.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Brijesh Singh , Toshimitsu Kani , Radim =?utf-8?B?S3LEjW3DocWZ?= , Matt Fleming , Alexander Potapenko , "H. Peter Anvin" , Larry Woodman , Jonathan Corbet , Joerg Roedel , "Michael S. Tsirkin" , Ingo Molnar , Andrey Ryabinin , Dave Young , Rik van Riel , Arnd Bergmann , Konrad Rzeszutek Wilk List-Id: linux-arch.vger.kernel.org On Fri, Jun 16, 2017 at 01:54:24PM -0500, Tom Lendacky wrote: > Since DMA addresses will effectively look like 48-bit addresses when the > memory encryption mask is set, SWIOTLB is needed if the DMA mask of the > device performing the DMA does not support 48-bits. SWIOTLB will be > initialized to create decrypted bounce buffers for use by these devices. > > Signed-off-by: Tom Lendacky > --- > arch/x86/include/asm/dma-mapping.h | 5 ++- > arch/x86/include/asm/mem_encrypt.h | 5 +++ > arch/x86/kernel/pci-dma.c | 11 +++++-- > arch/x86/kernel/pci-nommu.c | 2 + > arch/x86/kernel/pci-swiotlb.c | 15 +++++++++- > arch/x86/mm/mem_encrypt.c | 22 +++++++++++++++ > include/linux/swiotlb.h | 1 + > init/main.c | 10 +++++++ > lib/swiotlb.c | 54 +++++++++++++++++++++++++++++++----- > 9 files changed, 108 insertions(+), 17 deletions(-) Reviewed-by: Borislav Petkov -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.skyhub.de ([5.9.137.197]:53716 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751946AbdFUJzB (ORCPT ); Wed, 21 Jun 2017 05:55:01 -0400 Date: Wed, 21 Jun 2017 11:54:48 +0200 From: Borislav Petkov Subject: Re: [PATCH v7 24/36] x86, swiotlb: Add memory encryption support Message-ID: <20170621095448.6c52kp2eves5uyzy@pd.tnic> References: <20170616184947.18967.84890.stgit@tlendack-t1.amdoffice.net> <20170616185423.18967.19605.stgit@tlendack-t1.amdoffice.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170616185423.18967.19605.stgit@tlendack-t1.amdoffice.net> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Tom Lendacky Cc: linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, xen-devel@lists.xen.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Brijesh Singh , Toshimitsu Kani , Radim =?utf-8?B?S3LEjW3DocWZ?= , Matt Fleming , Alexander Potapenko , "H. Peter Anvin" , Larry Woodman , Jonathan Corbet , Joerg Roedel , "Michael S. Tsirkin" , Ingo Molnar , Andrey Ryabinin , Dave Young , Rik van Riel , Arnd Bergmann , Konrad Rzeszutek Wilk , Andy Lutomirski , Boris Ostrovsky , Dmitry Vyukov , Juergen Gross , Thomas Gleixner , Paolo Bonzini Message-ID: <20170621095448.wbdIa_hbbZKzypKSY6XETKKkBNKdsINFJVoPJiY5QVY@z> On Fri, Jun 16, 2017 at 01:54:24PM -0500, Tom Lendacky wrote: > Since DMA addresses will effectively look like 48-bit addresses when the > memory encryption mask is set, SWIOTLB is needed if the DMA mask of the > device performing the DMA does not support 48-bits. SWIOTLB will be > initialized to create decrypted bounce buffers for use by these devices. > > Signed-off-by: Tom Lendacky > --- > arch/x86/include/asm/dma-mapping.h | 5 ++- > arch/x86/include/asm/mem_encrypt.h | 5 +++ > arch/x86/kernel/pci-dma.c | 11 +++++-- > arch/x86/kernel/pci-nommu.c | 2 + > arch/x86/kernel/pci-swiotlb.c | 15 +++++++++- > arch/x86/mm/mem_encrypt.c | 22 +++++++++++++++ > include/linux/swiotlb.h | 1 + > init/main.c | 10 +++++++ > lib/swiotlb.c | 54 +++++++++++++++++++++++++++++++----- > 9 files changed, 108 insertions(+), 17 deletions(-) Reviewed-by: Borislav Petkov -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.