From patchwork Fri Jun 16 18:55:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9793335 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4203F60325 for ; Fri, 16 Jun 2017 18:58:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 340032865B for ; Fri, 16 Jun 2017 18:58:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 283912866B; Fri, 16 Jun 2017 18:58:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5BC8428672 for ; Fri, 16 Jun 2017 18:58:00 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLwPL-0004aT-8y; Fri, 16 Jun 2017 18:55:47 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLwPK-0004ZL-Dx for xen-devel@lists.xen.org; Fri, 16 Jun 2017 18:55:46 +0000 Received: from [85.158.143.35] by server-2.bemta-6.messagelabs.com id 97/5F-03058-1B924495; Fri, 16 Jun 2017 18:55:45 +0000 X-Brightmail-Tracker: H4sIAAAAAAA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.com!1497639343!62323848!1 X-Originating-IP: [104.47.36.53] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 62642 invoked from network); 16 Jun 2017 18:55:44 -0000 Received: from mail-sn1nam02on0053.outbound.protection.outlook.com (HELO NAM02-SN1-obe.outbound.protection.outlook.com) (104.47.36.53) by server-16.tower-21.messagelabs.com with AES256-SHA256 encrypted SMTP; 16 Jun 2017 18:55:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=M0077Zg2X22fOYEokw2JDkb1z5Gf/buP+2FXC34vnxs=; b=1SO/OkcAiE0jfcUBOMXjvzH0ucIRhtOYvzP2wFuF6Vq/8IWlmAxWYJUPv2kvWd71hVFaNRm5pY5LTCUd8JDTTpEOhqEyrNY70K6FoZsXCdnzosYulwWNGoDqD/zy7jHwKOkf/Dx4R8HoTPoptsz05699HuT5HHwUTqzEos243AY= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by MWHPR12MB1150.namprd12.prod.outlook.com (10.169.204.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Fri, 16 Jun 2017 18:55:35 +0000 From: Tom Lendacky To: 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 Date: Fri, 16 Jun 2017 13:55:33 -0500 Message-ID: <20170616185532.18967.63164.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170616184947.18967.84890.stgit@tlendack-t1.amdoffice.net> References: <20170616184947.18967.84890.stgit@tlendack-t1.amdoffice.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BN6PR04CA0050.namprd04.prod.outlook.com (10.174.93.167) To MWHPR12MB1150.namprd12.prod.outlook.com (10.169.204.14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7c981f73-f8b8-4b8c-57d1-08d4b4e9485d X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:MWHPR12MB1150; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1150; 3:yqGzY8cRAGM6E9w/1j4m0zGT4rdQnhpxzveogtlDycurfg50IsiydCvltJ+QUAQcbo+IQ6oRW3y8FY0ettJRkI7ai+5oR0hrqYK1iE9iYDKAt3PW2/lm0l+0EjjrtNHQ3CupvB/f+2JeEQT6KIEL+u7ah7Cprac6sbGIXuRaWm80YmN57MTpAY+f4UQYicDx7z0xEkeKX13Am++PSi4KfWYVNIi9yxylHf+1+9dzaDXrt5kRNWh8J60dXjnOlSsoF+xqgqcJvNKfGL/LctCwrIK1Q9aCEGFGGy+mrMKchgvsFSk8I3vDeEkBLNZFrXI6a+hzxkNUwax4+/95OO+UwvZ9xhXoLxwvpBQxeGsgZ0E=; 25:LqDaIJH0a9VYXmU/zSeswMW9cerY5c/5mkr/Vt0cNO1m4iXybJMljsfWAj0F19JnOT6Wh4HHFibbzsxaW/TdQztKN/5lScZWlRTKLuRzQBDo0wqAUqVQnOwM4Z9obPaTuvyb1ZrWtzgVQpDSQL3y+kmnhOyLwks1kH4CsUZVPP41YLFLkTHzLQflN67bfOyCrxaGMmxtP8LfstpBSGQLTMBUnh6Eym9p+HXkW7cKO/ohDcQmloXdL9VDA+bY62OfEtAuk9gijoTWWwwooqoxfUm4rSu9ZytdVHn3q0Z+b6EdFLXTzUOifJGa8Lkh8kEwhXTMHadkiV2DmMWgfTVxKh4C7JkiSyLC4TtSQnYeIoADf4n/khoRsCYQkewZhU3G3UQnFBmkLrDg4iC0elFrHpOtdJRmp4SrF1YhDNkgoN8hCOa6R0NPZ4Xm60H8XlAxAo07GplLyK//mW075bn45TeV2V0WgPcXmqOynqzoXNg= X-MS-TrafficTypeDiagnostic: MWHPR12MB1150: X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1150; 31:FhcGfU04DZOPPOAST8W2W2hkHoxUScQzE/mMI2lLRpSQq8rNBnrjCRLI6GyW+iZ4kC+G1z2EOlfWopAi2HhmmuA48h99ajaGGDjMCtXY+u+C0Nz6vdHGvK5fZL55Xj+pX93nkrRIvyiEDLFtkXgoAgclI9R+iX2VMUxOPW/PEXvsGliytJGUyULN6KgGnUP+eNEVnJlQtHC3dad4jQaAyVVpqy8135ud5L0EgfI7Av4=; 20:d1W+y3VQSQIewRorFXwIqx2pjGYFglzEl3YALEWH4c4F7umip9JIy14nuQmCeOThmTfd5xso0PG60U9pBZtxQiLp8xMgswKUyirHkW/+LDe9AZDThEwGD/96q3JRj507tIlXNUwwdjMsqixw2Os4ugKvMjdh4JLxJ7ak724zHE06CXOOjjgnCIb2M20dErWOVOKCogQLKXJejeE6NoVfoFckGiEhN2W15U59sGXhvUeTOyqNg4x0PMhyYMOJzjED46AGEv7171dcumpXYPBaRTeayyDgOukekMAnsZG39YwtnTbxgCb1LIXGbcvAYqIEPCK5Alz6Jh7ftUdWBl9FDXF+wA3iXw+HaTVAyBuwE/ccfsGSU3eSYl8KvfVLDcm7dOwbI0h6/czht0btqSeOWZgnAiJes5VCHmCbdw4Xb6dXWmKXaC5mDF7/lFQwIlKPgDa0Wq3mNKnXjoHYYjQuDB3sdFNo7eoiKSVZxDxCmldrYJYTeHlzpYmvy5jb+O5r X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123558100)(20161123562025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR12MB1150; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR12MB1150; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxMTUwOzQ6aytNSk5NTmlnaWorVzJRaVhqaERaVlFXWEVB?= =?utf-8?B?VEZZZnhhdEV6Mm9LWkdRbmZCQ2pvd0t1RjFUblpFU0JFMUFQMldEWVFSL001?= =?utf-8?B?a2J3cUVOV2lQOGlDYzF2ZVNWWllpRlowdTA2UzFERE1jMmhLNDQ1SDNvYTg1?= =?utf-8?B?ZEYwSThIZnNwVkhGZFpOWUlZTU9Ba0lnOWw0ZVdGTzlmMVNXMzlrbzUvOG1Y?= =?utf-8?B?a2M2d3dVdGRsZ2owbnd3Uk5nWDNmakkxMGtUL1FMbTJKOTU2N0JVeW1naXIw?= =?utf-8?B?bGVPM0xQVXhLWllUVUpYODF5T2dlM01QclFBRDR3aDAzdGF2d3ZEaWI5MEVF?= =?utf-8?B?RW5ZbEtXTEdtY0JOaU1jem5uQ202Wm02WGdDeU84M2pvQytXL2JKdjV2UStj?= =?utf-8?B?VDBQYXk4Y0ZQc0NDK29YdHppVEpCc3pubXhHeTE0dDZIemFGVmwrREdXcEsw?= =?utf-8?B?RGpVR2FZdEY0c3BabjNMNkdSVUljRGxxcFZpVDNNSS9NVGUrUWtlN3BWSFpV?= =?utf-8?B?RGFtUHJQcm9vVWpYRTZKYmF5dzdxTU8zRmpFUlEzMkVXZ0c5K3NjNytqMkZR?= =?utf-8?B?azZX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kxTzg5?= =?utf-8?B?Zlo5RWNZOHdNQlFFQWVidWxXVHhhMXAzRmVvNXJyZ2kvbUZwcTdhREg1U3pw?= =?utf-8?B?RERiS2luMXVQUGNOWjhFTHJJSVd0akhMYURKU1F4ay9KVDJuRzU5UUNUcnBh?= =?utf-8?Q?VrE6kxkBYUkjRZUKAxA?= X-Forefront-PRVS: 0340850FCD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39840400002)(39410400002)(39860400002)(39400400002)(39850400002)(33646002)(9686003)(5660300001)(54906002)(103116003)(4326008)(8676002)(7416002)(23676002)(83506001)(86362001)(81166006)(7406005)(50466002)(110136004)(305945005)(38730400002)(66066001)(6506006)(76176999)(47776003)(25786009)(72206003)(7736002)(53936002)(189998001)(478600001)(1076002)(2950100002)(42186005)(54356999)(4001350100001)(230700001)(55016002)(2906002)(3846002)(53416004)(6116002)(50986999)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1150; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxMTUwOzIzOkRGTEE3UDN1TytqZVdKeVZSbkNWYzRpQW14?= =?utf-8?B?NHVJWW9lcE9YcEVZaUpTNmF4WllzRXhsRkhmMkxHcHArclUyNkhzY0paTDA1?= =?utf-8?B?eFVBUjlxY09pUFBLeTNCYndyUE8yeHJZUnp0STVtdHdxN3FUc0Z5RjA5bFZw?= =?utf-8?B?TzFUeS9OaGxQbk5ueXI2c09GaGFxenVNTHJTaUJ0Z1pDdVRHYW8vbGdlMjhw?= =?utf-8?B?NTU4Vk5Tc3JuZ285eDhoN0IxZG1MSFNSc3RDVGU0OUpoK0YzaTN1ZXM5Qk5V?= =?utf-8?B?SXdCZG52RWpmK2FMbGEvWDYwN28wZU5aL2NPOW5paVNlUDcwcXN4ZXJRRDFk?= =?utf-8?B?bFl1bDlDWCt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51dnBDa1RtK0VEV1hhVlZVNUQ4UG9q?= =?utf-8?Q?e6VB+16?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1150; 5:MJAsym1VLth1MrqKVaegTJokF70pCIWWuLRdJmMu/XoTY4i8/la/1ZMKdTNfN3ECfChGsPfgR0Dlijuehv0YUDQtxDlTAfVPrdSOUs8uCiza9MR7cITx985+9lxUe8bg12rgtaI4XqxWgO/kua4HII1HJwa3enwxY9gNstLgHMCkGrhVRGwoVvkU1D708i091oSd8i31J0ZucaS4Oz7b+Bw3dvKDzrju+dNbRy/S5zQIP6d7/O2Dh9PjJAqnF2sz+3bi8dYke20wrGByWH0JP18sOfc4XKAOK7x6qBvyfDKBDEfDMNGqFmCfK2gM0zkuOycuD4vHuVQf7GPw3wdlRbKHJZG1HbKT7mfjRoct+0jHdzUzZET1hZVFzC0P2dghU3z3DKsJvHCz3L93orrwVFvNtTNIW4hlDCD+LbYW1Czz3SazzysstKGfbOcJdVzU7JYaEyfl0qvBL9hmXJq7punpN6FsrZLwNh1DzdfkyNCU07BQacvEj8kKKmR8FxVR; 24:H3mUNdU9k4ecuLJKiZCTCbyjDwZRbpD6sLrZARkIum1D7DeosFXp/t8Tgv6BCVagM/t4EN6doGkUUcr/Vb35Y8GxVLAvXEkMlSyCbfhrqn0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1150; 7:lpYv5NMNrlhgquovveKyxTjnwZGbO/kmSho9mlWSld3vO8a+XybVQy7OSx5sC83mJy2T3Chzxv3Dvb2uudFgffB6f3gTvqX/+BOZqwTx+Q7GrWURoNIy7txc1tMVZy2xlpnDTpH9Z5JG/QCWvIauEb02L6z/MZHTe3UZJG9Y5sOl4+J3oZSUeUWD2JXQVM8gJB2TAJWSUGHvgrYUDSjIerR+laDgSEboGBrSdhHaq+IYWHPjEzxrjEh1bUSsrYRo/oj4tIGoR7LB6Mrw3MO7NqsiCwf0ocdpipDbMUMIQ6ifJ4AeSFVk3r7EErVDI9aM7NhAmf03oMhkG5aoEIo3L8JWRW4YKtumqxU38Lccurc7gPwxjcx4cczedn2dJyhvUvnqfFn4HnzfBR14LRhafTxY7YpCGID2AU5DcV9Eyz7CDklxOJ9YHfhf8VngtKQYtt1woPMu+F6mOYVNCbb6epK8jcXFyVn56/f5m29Q09U9Fgs/nr7gMQjfMdeUFQY5pGgxMow/uMzyWu9SIl5vq1LRTiRqVF8OqIqGvF3sL2mBJUXxVGJSceWQJHXrNASHdJQXnMvE9xeyxIp1sApPZ+zBxEk8AMNNYCLP8GEHSVnVh+FYb6ETrGDhXklCGnDTKUJfUleB3aTJOPtID0W9nxviTPkIiwPUB28VNiDq/I2lhjAX5b8tEyHz6Z+T9q+GzM4ggBiFyBJgogNo+H39oh9pGLlvVtGfNbEcqea0nNTkuQUPYdUQRjlFgt0zRXRZ6F/Dl8VLfjOxvsSseVVx/Jx1Tg/WJkAj2VRYQFdrHyk= X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1150; 20:CkbukrSxW0fAeL6rHQK0GY+uGS1xfXe1EhJj8Xd7JBdLLWHv55WpbKaM4tlnwBnk69RYVJqRn9GEzFEpfzXw3JpZ+9IfvmhazzzKUu6m2zwW4TDxMghKTHvQ6fb7rYrDYHZddggqN6NcTJvQdizSWw31MZ/3T3oFSgrGXslLtaWnvlXa3jKuw6brhz1gXZQUx6KOyF/rzw8OiqTnwaHRs3LRczYp8tDK45z24OSxN9qTqCH7pjXRcky8ps0mLzVV X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2017 18:55:35.7272 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1150 Cc: Brijesh Singh , Toshimitsu Kani , "Michael S. Tsirkin" , Matt Fleming , Alexander Potapenko , "H. Peter Anvin" , Boris Ostrovsky , Jonathan Corbet , Joerg Roedel , Radim =?utf-8?b?S3LEjW3DocWZ?= , Larry Woodman , Ingo Molnar , Andrey Ryabinin , Dave Young , Rik van Riel , Arnd Bergmann , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , Dmitry Vyukov , Juergen Gross , Paolo Bonzini Subject: [Xen-devel] [PATCH v7 30/36] kvm: x86: svm: Support Secure Memory Encryption within KVM X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 the memory encryption mask when creating and using the nested page tables. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/mmu.c | 12 ++++++++---- arch/x86/kvm/mmu.h | 2 +- arch/x86/kvm/svm.c | 35 ++++++++++++++++++----------------- arch/x86/kvm/vmx.c | 3 ++- arch/x86/kvm/x86.c | 3 ++- 6 files changed, 32 insertions(+), 25 deletions(-) diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 695605e..6d1267f 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -1069,7 +1069,7 @@ struct kvm_arch_async_pf { void kvm_mmu_uninit_vm(struct kvm *kvm); void kvm_mmu_set_mask_ptes(u64 user_mask, u64 accessed_mask, u64 dirty_mask, u64 nx_mask, u64 x_mask, u64 p_mask, - u64 acc_track_mask); + u64 acc_track_mask, u64 me_mask); void kvm_mmu_reset_context(struct kvm_vcpu *vcpu); void kvm_mmu_slot_remove_write_access(struct kvm *kvm, diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index cb82259..e85888c 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -107,7 +107,7 @@ enum { (((address) >> PT32_LEVEL_SHIFT(level)) & ((1 << PT32_LEVEL_BITS) - 1)) -#define PT64_BASE_ADDR_MASK (((1ULL << 52) - 1) & ~(u64)(PAGE_SIZE-1)) +#define PT64_BASE_ADDR_MASK __sme_clr((((1ULL << 52) - 1) & ~(u64)(PAGE_SIZE-1))) #define PT64_DIR_BASE_ADDR_MASK \ (PT64_BASE_ADDR_MASK & ~((1ULL << (PAGE_SHIFT + PT64_LEVEL_BITS)) - 1)) #define PT64_LVL_ADDR_MASK(level) \ @@ -125,7 +125,7 @@ enum { * PT32_LEVEL_BITS))) - 1)) #define PT64_PERM_MASK (PT_PRESENT_MASK | PT_WRITABLE_MASK | shadow_user_mask \ - | shadow_x_mask | shadow_nx_mask) + | shadow_x_mask | shadow_nx_mask | shadow_me_mask) #define ACC_EXEC_MASK 1 #define ACC_WRITE_MASK PT_WRITABLE_MASK @@ -184,6 +184,7 @@ struct kvm_shadow_walk_iterator { static u64 __read_mostly shadow_dirty_mask; static u64 __read_mostly shadow_mmio_mask; static u64 __read_mostly shadow_present_mask; +static u64 __read_mostly shadow_me_mask; /* * The mask/value to distinguish a PTE that has been marked not-present for @@ -317,7 +318,7 @@ static bool check_mmio_spte(struct kvm_vcpu *vcpu, u64 spte) void kvm_mmu_set_mask_ptes(u64 user_mask, u64 accessed_mask, u64 dirty_mask, u64 nx_mask, u64 x_mask, u64 p_mask, - u64 acc_track_mask) + u64 acc_track_mask, u64 me_mask) { if (acc_track_mask != 0) acc_track_mask |= SPTE_SPECIAL_MASK; @@ -330,6 +331,7 @@ void kvm_mmu_set_mask_ptes(u64 user_mask, u64 accessed_mask, shadow_present_mask = p_mask; shadow_acc_track_mask = acc_track_mask; WARN_ON(shadow_accessed_mask != 0 && shadow_acc_track_mask != 0); + shadow_me_mask = me_mask; } EXPORT_SYMBOL_GPL(kvm_mmu_set_mask_ptes); @@ -2398,7 +2400,8 @@ static void link_shadow_page(struct kvm_vcpu *vcpu, u64 *sptep, BUILD_BUG_ON(VMX_EPT_WRITABLE_MASK != PT_WRITABLE_MASK); spte = __pa(sp->spt) | shadow_present_mask | PT_WRITABLE_MASK | - shadow_user_mask | shadow_x_mask | shadow_accessed_mask; + shadow_user_mask | shadow_x_mask | shadow_accessed_mask | + shadow_me_mask; mmu_spte_set(sptep, spte); @@ -2700,6 +2703,7 @@ static int set_spte(struct kvm_vcpu *vcpu, u64 *sptep, pte_access &= ~ACC_WRITE_MASK; spte |= (u64)pfn << PAGE_SHIFT; + spte |= shadow_me_mask; if (pte_access & ACC_WRITE_MASK) { diff --git a/arch/x86/kvm/mmu.h b/arch/x86/kvm/mmu.h index 330bf3a..08b779d 100644 --- a/arch/x86/kvm/mmu.h +++ b/arch/x86/kvm/mmu.h @@ -48,7 +48,7 @@ static inline u64 rsvd_bits(int s, int e) { - return ((1ULL << (e - s + 1)) - 1) << s; + return __sme_clr(((1ULL << (e - s + 1)) - 1) << s); } void kvm_mmu_set_mmio_spte_mask(u64 mmio_mask); diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index ba9891a..d2e9fca 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -1138,9 +1138,9 @@ static void avic_init_vmcb(struct vcpu_svm *svm) { struct vmcb *vmcb = svm->vmcb; struct kvm_arch *vm_data = &svm->vcpu.kvm->arch; - phys_addr_t bpa = page_to_phys(svm->avic_backing_page); - phys_addr_t lpa = page_to_phys(vm_data->avic_logical_id_table_page); - phys_addr_t ppa = page_to_phys(vm_data->avic_physical_id_table_page); + phys_addr_t bpa = __sme_set(page_to_phys(svm->avic_backing_page)); + phys_addr_t lpa = __sme_set(page_to_phys(vm_data->avic_logical_id_table_page)); + phys_addr_t ppa = __sme_set(page_to_phys(vm_data->avic_physical_id_table_page)); vmcb->control.avic_backing_page = bpa & AVIC_HPA_MASK; vmcb->control.avic_logical_id = lpa & AVIC_HPA_MASK; @@ -1203,8 +1203,8 @@ static void init_vmcb(struct vcpu_svm *svm) set_intercept(svm, INTERCEPT_MWAIT); } - control->iopm_base_pa = iopm_base; - control->msrpm_base_pa = __pa(svm->msrpm); + control->iopm_base_pa = __sme_set(iopm_base); + control->msrpm_base_pa = __sme_set(__pa(svm->msrpm)); control->int_ctl = V_INTR_MASKING_MASK; init_seg(&save->es); @@ -1338,9 +1338,9 @@ static int avic_init_backing_page(struct kvm_vcpu *vcpu) return -EINVAL; new_entry = READ_ONCE(*entry); - new_entry = (page_to_phys(svm->avic_backing_page) & - AVIC_PHYSICAL_ID_ENTRY_BACKING_PAGE_MASK) | - AVIC_PHYSICAL_ID_ENTRY_VALID_MASK; + new_entry = __sme_set((page_to_phys(svm->avic_backing_page) & + AVIC_PHYSICAL_ID_ENTRY_BACKING_PAGE_MASK) | + AVIC_PHYSICAL_ID_ENTRY_VALID_MASK); WRITE_ONCE(*entry, new_entry); svm->avic_physical_id_cache = entry; @@ -1608,7 +1608,7 @@ static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id) svm->vmcb = page_address(page); clear_page(svm->vmcb); - svm->vmcb_pa = page_to_pfn(page) << PAGE_SHIFT; + svm->vmcb_pa = __sme_set(page_to_pfn(page) << PAGE_SHIFT); svm->asid_generation = 0; init_vmcb(svm); @@ -1636,7 +1636,7 @@ static void svm_free_vcpu(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); - __free_page(pfn_to_page(svm->vmcb_pa >> PAGE_SHIFT)); + __free_page(pfn_to_page(__sme_clr(svm->vmcb_pa) >> PAGE_SHIFT)); __free_pages(virt_to_page(svm->msrpm), MSRPM_ALLOC_ORDER); __free_page(virt_to_page(svm->nested.hsave)); __free_pages(virt_to_page(svm->nested.msrpm), MSRPM_ALLOC_ORDER); @@ -2303,7 +2303,7 @@ static u64 nested_svm_get_tdp_pdptr(struct kvm_vcpu *vcpu, int index) u64 pdpte; int ret; - ret = kvm_vcpu_read_guest_page(vcpu, gpa_to_gfn(cr3), &pdpte, + ret = kvm_vcpu_read_guest_page(vcpu, gpa_to_gfn(__sme_clr(cr3)), &pdpte, offset_in_page(cr3) + index * 8, 8); if (ret) return 0; @@ -2315,7 +2315,7 @@ static void nested_svm_set_tdp_cr3(struct kvm_vcpu *vcpu, { struct vcpu_svm *svm = to_svm(vcpu); - svm->vmcb->control.nested_cr3 = root; + svm->vmcb->control.nested_cr3 = __sme_set(root); mark_dirty(svm->vmcb, VMCB_NPT); svm_flush_tlb(vcpu); } @@ -2803,7 +2803,7 @@ static bool nested_svm_vmrun_msrpm(struct vcpu_svm *svm) svm->nested.msrpm[p] = svm->msrpm[p] | value; } - svm->vmcb->control.msrpm_base_pa = __pa(svm->nested.msrpm); + svm->vmcb->control.msrpm_base_pa = __sme_set(__pa(svm->nested.msrpm)); return true; } @@ -4435,7 +4435,7 @@ static int svm_ir_list_add(struct vcpu_svm *svm, struct amd_iommu_pi_data *pi) pr_debug("SVM: %s: use GA mode for irq %u\n", __func__, irq.vector); *svm = to_svm(vcpu); - vcpu_info->pi_desc_addr = page_to_phys((*svm)->avic_backing_page); + vcpu_info->pi_desc_addr = __sme_set(page_to_phys((*svm)->avic_backing_page)); vcpu_info->vector = irq.vector; return 0; @@ -4486,7 +4486,8 @@ static int svm_update_pi_irte(struct kvm *kvm, unsigned int host_irq, struct amd_iommu_pi_data pi; /* Try to enable guest_mode in IRTE */ - pi.base = page_to_phys(svm->avic_backing_page) & AVIC_HPA_MASK; + pi.base = __sme_set(page_to_phys(svm->avic_backing_page) & + AVIC_HPA_MASK); pi.ga_tag = AVIC_GATAG(kvm->arch.avic_vm_id, svm->vcpu.vcpu_id); pi.is_guest_mode = true; @@ -4911,7 +4912,7 @@ static void svm_set_cr3(struct kvm_vcpu *vcpu, unsigned long root) { struct vcpu_svm *svm = to_svm(vcpu); - svm->vmcb->save.cr3 = root; + svm->vmcb->save.cr3 = __sme_set(root); mark_dirty(svm->vmcb, VMCB_CR); svm_flush_tlb(vcpu); } @@ -4920,7 +4921,7 @@ static void set_tdp_cr3(struct kvm_vcpu *vcpu, unsigned long root) { struct vcpu_svm *svm = to_svm(vcpu); - svm->vmcb->control.nested_cr3 = root; + svm->vmcb->control.nested_cr3 = __sme_set(root); mark_dirty(svm->vmcb, VMCB_NPT); /* Also sync guest cr3 here in case we live migrate */ diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 7dd53fb..53098cd 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -6452,7 +6452,8 @@ void vmx_enable_tdp(void) enable_ept_ad_bits ? VMX_EPT_DIRTY_BIT : 0ull, 0ull, VMX_EPT_EXECUTABLE_MASK, cpu_has_vmx_ept_execute_only() ? 0ull : VMX_EPT_READABLE_MASK, - enable_ept_ad_bits ? 0ull : VMX_EPT_RWX_MASK); + enable_ept_ad_bits ? 0ull : VMX_EPT_RWX_MASK, + 0ull); ept_set_mmio_spte_mask(); kvm_enable_tdp(); diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 87d3cb9..559f710 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -54,6 +54,7 @@ #include #include #include +#include #include @@ -6095,7 +6096,7 @@ int kvm_arch_init(void *opaque) kvm_mmu_set_mask_ptes(PT_USER_MASK, PT_ACCESSED_MASK, PT_DIRTY_MASK, PT64_NX_MASK, 0, - PT_PRESENT_MASK, 0); + PT_PRESENT_MASK, 0, sme_me_mask); kvm_timer_init(); perf_register_guest_info_callbacks(&kvm_guest_cbs);