x86, swiotlb: Add memory encryption support
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 <thomas.lendacky@amd.com> Reviewed-by:
Thomas Gleixner <tglx@linutronix.de> Cc: Alexander Potapenko <glider@google.com> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Borislav Petkov <bp@alien8.de> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Dave Young <dyoung@redhat.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Larry Woodman <lwoodman@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Matt Fleming <matt@codeblueprint.co.uk> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: Rik van Riel <riel@redhat.com> Cc: Toshimitsu Kani <toshi.kani@hpe.com> Cc: kasan-dev@googlegroups.com Cc: kvm@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-efi@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/aa2d29b78ae7d508db8881e46a3215231b9327a7.1500319216.git.thomas.lendacky@amd.com Signed-off-by:
Ingo Molnar <mingo@kernel.org>
Showing
- arch/x86/include/asm/dma-mapping.h 3 additions, 2 deletionsarch/x86/include/asm/dma-mapping.h
- arch/x86/include/asm/mem_encrypt.h 5 additions, 0 deletionsarch/x86/include/asm/mem_encrypt.h
- arch/x86/kernel/pci-dma.c 7 additions, 4 deletionsarch/x86/kernel/pci-dma.c
- arch/x86/kernel/pci-nommu.c 1 addition, 1 deletionarch/x86/kernel/pci-nommu.c
- arch/x86/kernel/pci-swiotlb.c 13 additions, 2 deletionsarch/x86/kernel/pci-swiotlb.c
- arch/x86/mm/mem_encrypt.c 22 additions, 0 deletionsarch/x86/mm/mem_encrypt.c
- include/linux/swiotlb.h 1 addition, 0 deletionsinclude/linux/swiotlb.h
- init/main.c 10 additions, 0 deletionsinit/main.c
- lib/swiotlb.c 46 additions, 8 deletionslib/swiotlb.c
Loading
Please register or sign in to comment