From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755579AbdGXTI2 (ORCPT ); Mon, 24 Jul 2017 15:08:28 -0400 Received: from mail-bn3nam01on0045.outbound.protection.outlook.com ([104.47.33.45]:41632 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754895AbdGXTIT (ORCPT ); Mon, 24 Jul 2017 15:08:19 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: linux-kernel@vger.kernel.org, x86@kernel.org, linux-efi@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Borislav Petkov , Andy Lutomirski , Tony Luck , Piotr Luc , Tom Lendacky , Fenghua Yu , Lu Baolu , Reza Arbab , David Howells , Matt Fleming , "Kirill A . Shutemov" , Laura Abbott , Ard Biesheuvel , Andrew Morton , Eric Biederman , Benjamin Herrenschmidt , Paul Mackerras , Konrad Rzeszutek Wilk , Jonathan Corbet , Dave Airlie , Kees Cook , Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Arnd Bergmann , Tejun Heo , Christoph Lameter , Brijesh Singh Subject: [RFC Part1 PATCH v3 00/17] x86: Secure Encrypted Virtualization (AMD) Date: Mon, 24 Jul 2017 14:07:40 -0500 Message-Id: <20170724190757.11278-1-brijesh.singh@amd.com> X-Mailer: git-send-email 2.9.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: CY4PR04CA0049.namprd04.prod.outlook.com (10.171.243.142) To CY1PR12MB0150.namprd12.prod.outlook.com (10.161.173.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ec575302-32cd-4213-7ffc-08d4d2c7565e X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY1PR12MB0150; X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0150;3:qodtmXaMsnUn9UL4BT7qzn+OhXqVeBqmvhD5cAlz37k/jTJOIw+IGFwkXWxrb7Oa4F8voU6yndtwZeL9Snfv6LxvlkGPrPv9x/4PN4P5cMRPoFD1PzhWxtbyvBoNZS8e2JKfTgh4gDZM0qKTNjBg1N8SYhNIZZ/SCquxsgHlt+estNg0C1IDkx2zK1ZBcb2WKziDKch768YTPzcnerQwALsqLWF0R/LMaYQBAwEkwBmAdT4LJQQeKlvlXOHVGJcYgxXwH6/ODLrPGP2GIEYmzVrK49XPXlzFdCxkrFLoAckxe7WB0ZSicVRg/tiFo5riRlCTcKtpgFXUur+5qDo3VdYM+KWoNdMGTYyBwoDgB6HA4SjfgABlqP7DseKPHySLZa3uUfeQs8BBeShHqjPOoWqbt7XljXnZ3rs7mCXWt5N63JHPyDTJT69w9E90B/Wi5ksQ3hAhj9tM9aZqd6wSMbsR+FKi17JCVO3QGBY4VYilu5T4Bj+6N5laiBSLgQlHAlOUWfzAEXf7rmnc5f91FyvE7oDLEbgRh7+lszMtSUFdnMIUT6iGe09zTily3qGCRThwsDp3zG4xLaJRI7oLt3u3NwwBd2QK2ljbZtUmY+PMMhciM42LxGuqwh6NrGGatZtvZweXKWv9FursMNO0QGMPzSrUdioe/OfMua/0RVT8uT0eTsGnKfNFX+giX+fNy01OgmqMPYwh+D87ivRCgpmYhRONiqeMmu80khtTNjp3H+KR3G1j5j+A2eH+r8Iy5h/CJ3g8YrILi4PUVl0C1Q== X-MS-TrafficTypeDiagnostic: CY1PR12MB0150: X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0150;25:12hw0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vR38Sob44mCzFXsVJAASk2dMptyunvtP1sAJkGmO X-Exchange-Antispam-Report-Test: UriScan:(166708455590820)(192374486261705)(767451399110)(17755550239193); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(6041248)(20161123564025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR12MB0150;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR12MB0150; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR12MB0150;4:R8uwSudyYuKjjAYYv4aOSMNe1NXEBtK/m2EiJC7GY1?= =?us-ascii?Q?thPWAsvNnKgBIzMVW+ICkuaarqL7tXdI4XqqlQiycjjNWiJSBX3hqzb/y5GT?= =?us-ascii?Q?38g5mIljM6MhzS2BWcQnEivY5OajITrjbcbnDonZHLv+YUm2JTIg0qSy0egz?= =?us-ascii?Q?XZLW7siS0R4oLA2K6sjS/4XdCyvJzMyHYkNDFxcHT4fjTppqYGmcnX2Jva6k?= =?us-ascii?Q?zAN6cLlqTu0AXIsn94uzlIrrZzlhi9QzjStQTDP+HyguesXZcCWSnJPwaqE3?= =?us-ascii?Q?3Zue4t02AMIgnlY/Fl6jamdIrCvHvxSlbkFvRnjpvV5wBRdO7Hj5R4Mo58m+?= =?us-ascii?Q?awfVu1WrqguG8UVNvrtbKoLYjFmDC/SZ1vJOyzWpRpHsl4xMRldSV1h93ii2?= =?us-ascii?Q?Wl2yzAYU+jpNI7G2bPb4Tz1OqdVc+sN0nZ7aZHeWAq1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=3D?= X-Forefront-PRVS: 0378F1E47A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(7370300001)(6009001)(39840400002)(39850400002)(39450400003)(39400400002)(39410400002)(39860400002)(199003)(189002)(4326008)(81156014)(7350300001)(81166006)(50226002)(50466002)(68736007)(36756003)(38730400002)(1076002)(110136004)(1720100001)(53936002)(6116002)(25786009)(48376002)(8676002)(86362001)(6306002)(305945005)(54906002)(7736002)(6666003)(50986999)(101416001)(47776003)(105586002)(5660300001)(5003940100001)(7416002)(33646002)(106356001)(966005)(66066001)(6486002)(7406005)(97736004)(189998001)(3846002)(2906002)(53416004)(42186005)(478600001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR12MB0150;H:ubuntu-010236106000.amd.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR12MB0150;23:VyE9BgqnOFfclA8onI15R2tr7b3gHrgvdqj3ys2nd?= =?us-ascii?Q?MpxivtWN0dNe+MRKPbleJdEUyRUrNeXDsUetWgeoC7clG+NQyoC7JVwtVHu5?= =?us-ascii?Q?AcMZnImGlQY6/gDSM+99HWrhW0Y/T4xHuxxnB6JcP0PV6g7JSbboMqD/iUkw?= =?us-ascii?Q?v2nKdPvUEmGSpv8nqO2OGKWtsKd/3vLQxQxfcuX/ddfz+IKjHlwuqBiBkPFk?= =?us-ascii?Q?UTeRQWF+0qUg1fpnX0fmN6qSYbkZEqQI/6hHpkUPWldpmL9+Z3k+OrfI3Q4W?= =?us-ascii?Q?CpUjLpoXHsdoMA3TiklSSwvGe8kJ7NTiy5Xkb/rXyu9yV05I/lXxjdXAgI/t?= =?us-ascii?Q?AL63LFkPqkBVauhm1eumLtNIfkXGj2UAYDJC27rDrCTVtJVuzw3EqUj8NSSX?= =?us-ascii?Q?fq1feapXFzvjg9qEBifBAYmgUWjbMEtTJOD7AZ8M5GBbLidHANqHmuNcVMfZ?= =?us-asc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Sp?= =?us-ascii?Q?rjxHiQ8y+HzxzHpEGGfJmU5HnMC+XtPYZuJCoTg60vQqMbfiXu6420RV1ck6?= =?us-ascii?Q?NdPXVJAxZCCjwj8SElhxAMo2ecNrTleoya5xTE2G46121DeHf1p25VkjWXKq?= =?us-ascii?Q?0FYv4e8xhUmisRr2vOi5cB3/pv7uO/GjzFj+lSCSs7QIowRYylX/13vfj5ug?= =?us-ascii?Q?8F0oi4WzmJSdf3uWhsNcHt?= X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0150;5:lYWHwLcB2qN5CGdmUIfdOPmNv0UYTahCQNO8dGlfWnAQd9H6PXPa3C3Ri7JfxiGlX6TiaWu3tJVs/JddqyT2HUS0P6f9wuEHd+AEbdYF5sqspVTZWHB+iRB6l5LPlRPQ/MVxM17yNjQiQ3B0XXgLlSennUZSkwAinds8f3sMCfzAC6KN8nB15aVuh3wYz27cEUIIlH8rIOb5klNzphykf6/30akNgIUtPxVmxGZ+RJfOwn7LE+QuXSZBE0t4DSpC0PW78Qg/RaeHAwcMljSNrxsbf2uoufzRqMYXR5qRHi7eT386QdRpGkr4IcCYjxJLpK7y2Mw0EJZHKJlItHq9XjTuLZvKEJ8GXbWpjrItfnWfZK+x17JPdcdPCUqakKhsrQMtfUkfhtE99tVZ1b6h/shV5M7asrTVSWLAE/BodDsOO2K15M4SYOxlNhSXcWg6nAKiIsRoSduyEEnmuV6VxUZJjEtFphuBuza4c15mUbUg7rcicu2p8Rw1j3/czSnt;24:V9wDN8x+D14d+e8oHk06FWFKiKt61xbB3izzBFNYe/1OYY7XgmAQUsXminHZjjsRAhn73XC50SiyVPuJ753WDlmcO9p9N1q1BjX5s6OcCEc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0150;7:2ffm4t3YyE5styhDCpGhYgZX7y33j+wr9cdKhN4EfagoHXcQ9xrSiJqdt8JwPl1rL1Z7+xlIXRHP0O0842rNTr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ul 2017 19:08:14.0597 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0150 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This part of Secure Encrypted Virtualization (SEV) series focuses on the changes required in a guest OS for SEV support. When SEV is active, the memory content of guest OS will be transparently encrypted with a key unique to the guest VM. SEV guests have concept of private and shared memory. Private memory is encrypted with the guest-specific key, while shared memory may be encrypted with hypervisor key. Certain type of memory (namely insruction pages and guest page tables) are always treated as private. Due to security reasons all DMA operations inside the guest must be performed on shared memory. The SEV feature is enabled by the hypervisor, and guest can identify it through CPUID function and the 0xc0010131 (F17H_SEV) MSR. When enabled, page table entries will determine how memory is accessed. If a page table entry has the memory encryption mask set, then that memory will be accessed using guest-specific key. Certain memory (instruction pages, page tables) will always be accessed using guest-specific key. This patch series builds upon the Secure Memory Encryption (SME) feature. Unlike SME, when SEV is enabled, all the data (e.g EFI, kernel, initrd, etc) will have been placed into memory as encrypted by the guest BIOS. The approach that this patch series takes is to encrypt everything possible starting early in the boot. Since the DMA operations inside guest must be performed on shared memory hence it uses SW-IOTLB to complete the DMA operations. The following links provide additional details: AMD Memory Encryption whitepaper: http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2013/12/AMD_Memory_Encryption_Whitepaper_v7-Public.pdf AMD64 Architecture Programmer's Manual: http://support.amd.com/TechDocs/24593.pdf SME is section 7.10 SEV is section 15.34 Secure Encrypted Virutualization Key Management: http://support.amd.com/TechDocs/55766_SEV-KM API_Specification.pdf KVM Forum Presentation: http://www.linux-kvm.org/images/7/74/02x08A-Thomas_Lendacky-AMDs_Virtualizatoin_Memory_Encryption_Technology.pdf SEV Guest BIOS support: SEV support has been accepted into EDKII/OVMF BIOS https://github.com/tianocore/edk2/commits/master --- This RFC is based on tip/master commit : 22db3de (Merge branch 'x86/mm'). Complete git tree is available: https://github.com/codomania/tip/tree/sev-rfc-3 Changes since v2: * add documentation * update early_set_memory_* to use kernel_physical_mapping_init() to split larger page into smaller (recommended by Boris) * changes to address v2 feedback Brijesh Singh (4): Documentation/x86: Add AMD Secure Encrypted Virtualization (SEV) descrption x86: Add support for changing memory encryption attribute in early boot X86/KVM: Provide support to create Guest and HV shared per-CPU variables X86/KVM: Clear encryption attribute when SEV is active Tom Lendacky (13): x86/CPU/AMD: Add the Secure Encrypted Virtualization CPU feature x86/mm: Secure Encrypted Virtualization (SEV) support x86/mm: Don't attempt to encrypt initrd under SEV x86, realmode: Don't decrypt trampoline area under SEV x86/mm: Use encrypted access of boot related data with SEV x86/mm: Include SEV for encryption memory attribute changes x86/efi: Access EFI data as encrypted when SEV is active resource: Consolidate resource walking code resource: Provide resource struct in resource walk callback x86/mm, resource: Use PAGE_KERNEL protection for ioremap of memory pages x86/mm: DMA support for SEV memory encryption x86/io: Unroll string I/O when SEV is active x86/boot: Add early boot support when running with SEV active Documentation/x86/amd-memory-encryption.txt | 29 +++- arch/powerpc/kernel/machine_kexec_file_64.c | 12 +- arch/x86/boot/compressed/Makefile | 2 + arch/x86/boot/compressed/head_64.S | 16 ++ arch/x86/boot/compressed/mem_encrypt.S | 103 ++++++++++++ arch/x86/boot/compressed/misc.h | 2 + arch/x86/boot/compressed/pagetable.c | 8 +- arch/x86/entry/vdso/vma.c | 5 +- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/io.h | 26 ++- arch/x86/include/asm/mem_encrypt.h | 22 +++ arch/x86/include/asm/msr-index.h | 5 + arch/x86/include/uapi/asm/kvm_para.h | 1 - arch/x86/kernel/cpu/amd.c | 30 +++- arch/x86/kernel/cpu/scattered.c | 1 + arch/x86/kernel/crash.c | 18 +- arch/x86/kernel/kvm.c | 46 +++++- arch/x86/kernel/kvmclock.c | 64 ++++++- arch/x86/kernel/pmem.c | 2 +- arch/x86/kernel/setup.c | 6 +- arch/x86/mm/ioremap.c | 72 ++++++-- arch/x86/mm/mem_encrypt.c | 248 +++++++++++++++++++++++++++- arch/x86/mm/pageattr.c | 4 +- arch/x86/platform/efi/efi_64.c | 15 +- arch/x86/realmode/init.c | 6 +- include/asm-generic/vmlinux.lds.h | 3 + include/linux/ioport.h | 7 +- include/linux/kexec.h | 2 +- include/linux/mem_encrypt.h | 8 +- include/linux/percpu-defs.h | 12 ++ kernel/kexec_file.c | 5 +- kernel/resource.c | 75 +++++---- lib/swiotlb.c | 5 +- 33 files changed, 755 insertions(+), 106 deletions(-) create mode 100644 arch/x86/boot/compressed/mem_encrypt.S -- 2.9.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brijesh Singh Subject: [RFC Part1 PATCH v3 00/17] x86: Secure Encrypted Virtualization (AMD) Date: Mon, 24 Jul 2017 14:07:40 -0500 Message-ID: <20170724190757.11278-1-brijesh.singh@amd.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Borislav Petkov , Andy Lutomirski , Tony Luck , Piotr Luc , Tom Lendacky , Fenghua Yu , Lu Baolu , Reza Arbab , David Howells , Matt Fleming , "Kirill A . Shutemov" , Laura Abbott , Ard Biesheuvel , Andrew Morton , Eric Biederman , Benjamin Herrenschmidt Paul Mackerras

List-Id: linux-efi@vger.kernel.org This part of Secure Encrypted Virtualization (SEV) series focuses on the changes required in a guest OS for SEV support. When SEV is active, the memory content of guest OS will be transparently encrypted with a key unique to the guest VM. SEV guests have concept of private and shared memory. Private memory is encrypted with the guest-specific key, while shared memory may be encrypted with hypervisor key. Certain type of memory (namely insruction pages and guest page tables) are always treated as private. Due to security reasons all DMA operations inside the guest must be performed on shared memory. The SEV feature is enabled by the hypervisor, and guest can identify it through CPUID function and the 0xc0010131 (F17H_SEV) MSR. When enabled, page table entries will determine how memory is accessed. If a page table entry has the memory encryption mask set, then that memory will be accessed using guest-specific key. Certain memory (instruction pages, page tables) will always be accessed using guest-specific key. This patch series builds upon the Secure Memory Encryption (SME) feature. Unlike SME, when SEV is enabled, all the data (e.g EFI, kernel, initrd, etc) will have been placed into memory as encrypted by the guest BIOS. The approach that this patch series takes is to encrypt everything possible starting early in the boot. Since the DMA operations inside guest must be performed on shared memory hence it uses SW-IOTLB to complete the DMA operations. The following links provide additional details: AMD Memory Encryption whitepaper: http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2013/12/AMD_Memory_Encryption_Whitepaper_v7-Public.pdf AMD64 Architecture Programmer's Manual: http://support.amd.com/TechDocs/24593.pdf SME is section 7.10 SEV is section 15.34 Secure Encrypted Virutualization Key Management: http://support.amd.com/TechDocs/55766_SEV-KM API_Specification.pdf KVM Forum Presentation: http://www.linux-kvm.org/images/7/74/02x08A-Thomas_Lendacky-AMDs_Virtualizatoin_Memory_Encryption_Technology.pdf SEV Guest BIOS support: SEV support has been accepted into EDKII/OVMF BIOS https://github.com/tianocore/edk2/commits/master --- This RFC is based on tip/master commit : 22db3de (Merge branch 'x86/mm'). Complete git tree is available: https://github.com/codomania/tip/tree/sev-rfc-3 Changes since v2: * add documentation * update early_set_memory_* to use kernel_physical_mapping_init() to split larger page into smaller (recommended by Boris) * changes to address v2 feedback Brijesh Singh (4): Documentation/x86: Add AMD Secure Encrypted Virtualization (SEV) descrption x86: Add support for changing memory encryption attribute in early boot X86/KVM: Provide support to create Guest and HV shared per-CPU variables X86/KVM: Clear encryption attribute when SEV is active Tom Lendacky (13): x86/CPU/AMD: Add the Secure Encrypted Virtualization CPU feature x86/mm: Secure Encrypted Virtualization (SEV) support x86/mm: Don't attempt to encrypt initrd under SEV x86, realmode: Don't decrypt trampoline area under SEV x86/mm: Use encrypted access of boot related data with SEV x86/mm: Include SEV for encryption memory attribute changes x86/efi: Access EFI data as encrypted when SEV is active resource: Consolidate resource walking code resource: Provide resource struct in resource walk callback x86/mm, resource: Use PAGE_KERNEL protection for ioremap of memory pages x86/mm: DMA support for SEV memory encryption x86/io: Unroll string I/O when SEV is active x86/boot: Add early boot support when running with SEV active Documentation/x86/amd-memory-encryption.txt | 29 +++- arch/powerpc/kernel/machine_kexec_file_64.c | 12 +- arch/x86/boot/compressed/Makefile | 2 + arch/x86/boot/compressed/head_64.S | 16 ++ arch/x86/boot/compressed/mem_encrypt.S | 103 ++++++++++++ arch/x86/boot/compressed/misc.h | 2 + arch/x86/boot/compressed/pagetable.c | 8 +- arch/x86/entry/vdso/vma.c | 5 +- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/io.h | 26 ++- arch/x86/include/asm/mem_encrypt.h | 22 +++ arch/x86/include/asm/msr-index.h | 5 + arch/x86/include/uapi/asm/kvm_para.h | 1 - arch/x86/kernel/cpu/amd.c | 30 +++- arch/x86/kernel/cpu/scattered.c | 1 + arch/x86/kernel/crash.c | 18 +- arch/x86/kernel/kvm.c | 46 +++++- arch/x86/kernel/kvmclock.c | 64 ++++++- arch/x86/kernel/pmem.c | 2 +- arch/x86/kernel/setup.c | 6 +- arch/x86/mm/ioremap.c | 72 ++++++-- arch/x86/mm/mem_encrypt.c | 248 +++++++++++++++++++++++++++- arch/x86/mm/pageattr.c | 4 +- arch/x86/platform/efi/efi_64.c | 15 +- arch/x86/realmode/init.c | 6 +- include/asm-generic/vmlinux.lds.h | 3 + include/linux/ioport.h | 7 +- include/linux/kexec.h | 2 +- include/linux/mem_encrypt.h | 8 +- include/linux/percpu-defs.h | 12 ++ kernel/kexec_file.c | 5 +- kernel/resource.c | 75 +++++---- lib/swiotlb.c | 5 +- 33 files changed, 755 insertions(+), 106 deletions(-) create mode 100644 arch/x86/boot/compressed/mem_encrypt.S -- 2.9.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brijesh Singh Subject: [RFC Part1 PATCH v3 00/17] x86: Secure Encrypted Virtualization (AMD) Date: Mon, 24 Jul 2017 14:07:40 -0500 Message-ID: <20170724190757.11278-1-brijesh.singh@amd.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Borislav Petkov , Andy Lutomirski , Tony Luck , Piotr Luc , Tom Lendacky , Fenghua Yu , Lu Baolu , Reza Arbab , David Howells , Matt Fleming , "Kirill A . Shutemov" , Laura Abbott , Ard Biesheuvel , Andrew Morton , Eric Biederman , Benjamin Herrenschmidt , Paul Mackerras

Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: kvm.vger.kernel.org This part of Secure Encrypted Virtualization (SEV) series focuses on the changes required in a guest OS for SEV support. When SEV is active, the memory content of guest OS will be transparently encrypted with a key unique to the guest VM. SEV guests have concept of private and shared memory. Private memory is encrypted with the guest-specific key, while shared memory may be encrypted with hypervisor key. Certain type of memory (namely insruction pages and guest page tables) are always treated as private. Due to security reasons all DMA operations inside the guest must be performed on shared memory. The SEV feature is enabled by the hypervisor, and guest can identify it through CPUID function and the 0xc0010131 (F17H_SEV) MSR. When enabled, page table entries will determine how memory is accessed. If a page table entry has the memory encryption mask set, then that memory will be accessed using guest-specific key. Certain memory (instruction pages, page tables) will always be accessed using guest-specific key. This patch series builds upon the Secure Memory Encryption (SME) feature. Unlike SME, when SEV is enabled, all the data (e.g EFI, kernel, initrd, etc) will have been placed into memory as encrypted by the guest BIOS. The approach that this patch series takes is to encrypt everything possible starting early in the boot. Since the DMA operations inside guest must be performed on shared memory hence it uses SW-IOTLB to complete the DMA operations. The following links provide additional details: AMD Memory Encryption whitepaper: http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2013/12/AMD_Memory_Encryption_Whitepaper_v7-Public.pdf AMD64 Architecture Programmer's Manual: http://support.amd.com/TechDocs/24593.pdf SME is section 7.10 SEV is section 15.34 Secure Encrypted Virutualization Key Management: http://support.amd.com/TechDocs/55766_SEV-KM API_Specification.pdf KVM Forum Presentation: http://www.linux-kvm.org/images/7/74/02x08A-Thomas_Lendacky-AMDs_Virtualizatoin_Memory_Encryption_Technology.pdf SEV Guest BIOS support: SEV support has been accepted into EDKII/OVMF BIOS https://github.com/tianocore/edk2/commits/master --- This RFC is based on tip/master commit : 22db3de (Merge branch 'x86/mm'). Complete git tree is available: https://github.com/codomania/tip/tree/sev-rfc-3 Changes since v2: * add documentation * update early_set_memory_* to use kernel_physical_mapping_init() to split larger page into smaller (recommended by Boris) * changes to address v2 feedback Brijesh Singh (4): Documentation/x86: Add AMD Secure Encrypted Virtualization (SEV) descrption x86: Add support for changing memory encryption attribute in early boot X86/KVM: Provide support to create Guest and HV shared per-CPU variables X86/KVM: Clear encryption attribute when SEV is active Tom Lendacky (13): x86/CPU/AMD: Add the Secure Encrypted Virtualization CPU feature x86/mm: Secure Encrypted Virtualization (SEV) support x86/mm: Don't attempt to encrypt initrd under SEV x86, realmode: Don't decrypt trampoline area under SEV x86/mm: Use encrypted access of boot related data with SEV x86/mm: Include SEV for encryption memory attribute changes x86/efi: Access EFI data as encrypted when SEV is active resource: Consolidate resource walking code resource: Provide resource struct in resource walk callback x86/mm, resource: Use PAGE_KERNEL protection for ioremap of memory pages x86/mm: DMA support for SEV memory encryption x86/io: Unroll string I/O when SEV is active x86/boot: Add early boot support when running with SEV active Documentation/x86/amd-memory-encryption.txt | 29 +++- arch/powerpc/kernel/machine_kexec_file_64.c | 12 +- arch/x86/boot/compressed/Makefile | 2 + arch/x86/boot/compressed/head_64.S | 16 ++ arch/x86/boot/compressed/mem_encrypt.S | 103 ++++++++++++ arch/x86/boot/compressed/misc.h | 2 + arch/x86/boot/compressed/pagetable.c | 8 +- arch/x86/entry/vdso/vma.c | 5 +- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/io.h | 26 ++- arch/x86/include/asm/mem_encrypt.h | 22 +++ arch/x86/include/asm/msr-index.h | 5 + arch/x86/include/uapi/asm/kvm_para.h | 1 - arch/x86/kernel/cpu/amd.c | 30 +++- arch/x86/kernel/cpu/scattered.c | 1 + arch/x86/kernel/crash.c | 18 +- arch/x86/kernel/kvm.c | 46 +++++- arch/x86/kernel/kvmclock.c | 64 ++++++- arch/x86/kernel/pmem.c | 2 +- arch/x86/kernel/setup.c | 6 +- arch/x86/mm/ioremap.c | 72 ++++++-- arch/x86/mm/mem_encrypt.c | 248 +++++++++++++++++++++++++++- arch/x86/mm/pageattr.c | 4 +- arch/x86/platform/efi/efi_64.c | 15 +- arch/x86/realmode/init.c | 6 +- include/asm-generic/vmlinux.lds.h | 3 + include/linux/ioport.h | 7 +- include/linux/kexec.h | 2 +- include/linux/mem_encrypt.h | 8 +- include/linux/percpu-defs.h | 12 ++ kernel/kexec_file.c | 5 +- kernel/resource.c | 75 +++++---- lib/swiotlb.c | 5 +- 33 files changed, 755 insertions(+), 106 deletions(-) create mode 100644 arch/x86/boot/compressed/mem_encrypt.S -- 2.9.4