From patchwork Tue Jun 27 15:01:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9812275 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 A7DB460351 for ; Tue, 27 Jun 2017 15:04:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24BFF280B0 for ; Tue, 27 Jun 2017 15:04:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17B8A2818A; Tue, 27 Jun 2017 15:04:04 +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 2864D280B0 for ; Tue, 27 Jun 2017 15:04:03 +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 1dPrzr-0006GR-BG; Tue, 27 Jun 2017 15:01:43 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPrzq-0006FY-BA for xen-devel@lists.xen.org; Tue, 27 Jun 2017 15:01:42 +0000 Received: from [85.158.139.211] by server-2.bemta-5.messagelabs.com id 73/9C-01996-55372595; Tue, 27 Jun 2017 15:01:41 +0000 X-Brightmail-Tracker: H4sIAAA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elabs.com!1498575699!101727758!1 X-Originating-IP: [104.47.41.66] 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 55753 invoked from network); 27 Jun 2017 15:01:40 -0000 Received: from mail-dm3nam03on0066.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) (104.47.41.66) by server-3.tower-206.messagelabs.com with AES256-SHA256 encrypted SMTP; 27 Jun 2017 15:01:40 -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=CnWKSVHJW3IsuD0GvJxhtwOoucwGDQDMFYv8/VnVTMDwOWBrcX+4jE4G+kM5dLDwEcWbdjt+/1JQFuLHHPTahWekzxFH2JugKJJ3v4Sj4XoC7J7Yy0Bf5z1KFS8dw/OAOtdpWF8pIo3MgyFqxX/942RUuYLPXNFpzqidOFSUKF0= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by DM5PR12MB1148.namprd12.prod.outlook.com (10.168.236.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Tue, 27 Jun 2017 15:01:34 +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: Tue, 27 Jun 2017 10:01:31 -0500 Message-ID: <20170627150131.15908.22634.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170627145607.15908.26571.stgit@tlendack-t1.amdoffice.net> References: <20170627145607.15908.26571.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: SN1PR16CA0039.namprd16.prod.outlook.com (10.169.34.49) To DM5PR12MB1148.namprd12.prod.outlook.com (10.168.236.143) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5a2cb641-5d71-47fa-ebdb-08d4bd6d67d9 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)(300000506067)(300135500095); SRVR:DM5PR12MB1148; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1148; 3:/wmYYhj5g0hr4ezTfY5g3nyM/InqjIQtRxb5tHuIR2tFu6wykpkh3dhGA5htjYq0OCfQn7FEWreMiERG0+tsBItFXrtZ57Sl9KUo9xje9JKIuJkrh9ogPFDMRsMZ9f+lrhTsJP9CKpd2lYrDkS3zqQhrmqS5voqLrLnkfInSzYyhu4v0mUIPzoY76wWhD8SbkWTy7kY+Nice907i9b2v/RxFqYelNSbJqVT/j8LqhyzlYsvj4egLYntxda8K9tkuEc9kPmIroC5At57MGl7i0+Z8xZwec/GSEqRqbKRVZmf0mWdCkwOmI8Wyqa6DZZpsZgGsysci3YVkrwY35DjOLQQh5ojVHHFyJBmTj/LvhMDCrRrOm1X4yxr7gmBHHJy5Go5XEP3nbj2ZS/EmU6VnvkjgVRfE/4RRCRmd7Osgj1u6xOMb/luqRPQOiukUAWVApKNy6XiJU/qwiXIGO7dhPEvEWxAA3JtiUJWKURW73v/0UQqx/vmKNSJrgTJ4A23BI3yG1XYzc8XdSBOx4ZZPvwimA44BXiCrD9Yvti0jBE8gX9/e2bj3GXVQQmWcpK9xt6EKlsFO63iFwqvfwMM/sxGFUdN1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23hoZ+6WDmPX3taFqH0FMY/1cAE6fDo78tCYQSsQdX9KI6OpuQyHcnXw95WksX617gEdQVFu+vjooncYQPHYrydQR8uqVF6TJydz/V2WSlYyQWF9nXOVXc3BkwtBgrQcQGl/kM4BF8K8G4MuBKFh1Ztdp1/tW6iX/XN55RMqQAQzdh7DmfwNfCCbWw4gMTAtuG9k381SsbzBT0Zz4iqOghjvZ/ALGSEtOtHOESwXjxSyiJG490/WjNxy1pZFBOVnrJOKNSJvGhAfB+hsm/TWdPK7JzCwGTwViKp8c6ZvcwnP+A7w6MdcA0XXnET2a/ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(125551606395959)(133145235818549)(236129657087228)(767451399110)(148574349560750)(167848164394848); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(20161123562025)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR12MB1148; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR12MB1148; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyTUIxMTQ4OzQ6V3IybkR4UHUrTEtaY2d6di9TWkNqdGcwY2kw?= =?utf-8?B?U21NZVdKVTdNK2RReGptcUFwZVFNaTdBVUluQTk1SlFHUUhvYWRnTVh6OVBl?= =?utf-8?B?TVY1WVJmaDBlVlR2SGxwdXlzK0dYK2NpSVV5eU9BamxVLzdEQ1lDQnQzMGVt?= =?utf-8?B?dHVqUUx6SWRlSkVvZy9CS0VBanFLWFB6RmpLK3FXTjFnMk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HhJd3ZHYWhZckMrN0JVMmR6?= =?utf-8?B?ZUFZaUE2N2tEajlKZmlBZHFHRDlnUFF2WE5XTUlRbGw0ZThvMDFkbGRXNCsz?= =?utf-8?B?TnZNejZ2RnBSNFd5bWtmR0tMeDFrMXA1VmViOE9oQnJLdnBabmZuTTQ5cGNJ?= =?utf-8?B?REtDeFlYZWVIWkRVNUZWb1FUaTJDSFF5TFVaaG1ibzVVNUFyOWJwMThpUjBI?= =?utf-8?B?VzU5bzNPZ2c5ZE9CbE9RekNLNHVWWnJWTDhnLzJKU1NERVcxYjZnK21kbEdF?= =?utf-8?B?L2pYZCsvKzZKeEx6N2o0aWl4Z3kzbWEyN1l6LzZOYnFlYTJ4WFk2bXM5dXpI?= =?utf-8?B?c2JjSm5KWitCZmRodHBSSUp5ZVk4NXBQNUMwWHIxV0VTNkNoZzd5U3E3T09k?= =?utf-8?B?ZkNHMXNyWlk0QTF4bmlxRFhjbWpldm11WFhIOW12a2ZuNlpuY2l1bXlzaXE1?= =?utf-8?B?cFFScElya2hHQVJMQTdkZEJVbWlMYXhkZkZ6R1d4RnkyRTU1WVJKSVV2KzBr?= =?utf-8?B?N3JlaEhwTjdydTFOaDI5bERHS0R2RFA3RloxK3BPRDd1WjA5dzFnWDlIVmtz?= =?utf-8?B?K2pZaDVybGRXcnM2Q0MrRVZKUThWV2wyU1pJOVk5dWY4OFYwZjFHb0tzeTQx?= =?utf-8?B?THRjTk4rUVFBVnE5VXpzTDllOURHbm1DRjFmOEg5bXJPZVJuVEtUMHRObXhR?= =?utf-8?B?cTZJQ1J6c2IyM0tJek9nVmIxdkpGYzhSdFBWZFZhSjNPWUEydEdncFZ0Rjky?= =?utf-8?Q?CzAXVtf8g4=3D?= X-Forefront-PRVS: 0351D213B3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(979002)(6009001)(39840400002)(39860400002)(39410400002)(39450400003)(39400400002)(39850400002)(2950100002)(478600001)(6666003)(2906002)(6116002)(3846002)(53936002)(9686003)(7406005)(55016002)(83506001)(50466002)(110136004)(1076002)(305945005)(72206003)(230700001)(33646002)(7416002)(54906002)(54356999)(76176999)(50986999)(97746001)(4326008)(189998001)(7736002)(5660300001)(4001350100001)(103116003)(86362001)(8676002)(42186005)(23676002)(53416004)(25786009)(47776003)(81166006)(66066001)(6506006)(38730400002)(921003)(1121003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1148; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyTUIxMTQ4OzIzOjJ3Wnh3QW5yVlVHOFN3ZDNoR0ZlQ1l1dTE2?= =?utf-8?B?QmkxUnhsLzR2NVZ4VWpQaFVqQUs3NGFsNVppaTFDOVpRM0o2dWsyOWN1cHJG?= =?utf-8?B?ZjJ6bjl6VEZVSDUrbnBHV1VPd3ZQUStzVU5WL2tjd2cyQUNuM00zc0J1NnNx?= =?utf-8?B?UzViZGVJdzVoQlhlaEkvaUpTZTlKY3ZrNjVKQ2VERHFrQzVzMWZNQndRS21Y?= =?utf-8?B?c09kSHk0WURHSy9KUk90N3pLdzJERGgvYUtMVVRYQWczRFpNeDllRGtXME53?= =?utf-8?B?YVpmNGZzbGtkcStaMHlDL1pZeVFUQmloWUs2M3ptSWZ4RkRTUExsakgwNGJr?= =?utf-8?B?RU1hSFp3OTRtdFMybmc1OUFsWStkaktqN0d5VGZDMmVCNUdGZXRPcGdmODM4?= =?utf-8?B?QU8yVkRuVkJWZW1CZkZSd2JGeURmYnEzU05IOFdIc252VHJwMkVYNS95OHl2?= =?utf-8?B?WnlwdXdHcGhaQ29idFNSMXo3TUdkenZTV2lQdk5tbFQxbldsQ1pMMGdPc0Ny?= =?utf-8?B?OW1IODU4cEdvNk9CYWNpMGUxUnp3RnMrUjkycUZLYVdKb1YvckdxWVo2T3gx?= =?utf-8?B?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i05HhaCF0uoMYsv9MDBIRZiCUnjufhz9r8obd7WnHzkImvUXTaYkdJV7VHB04LEJG8jp4ZMirCmH0Y93uGTDFAgKu9klYqMfJNrvU+350yMqgEwt0pZu6Z5JFpqlqi/obcVD4B/4C0z/uIv2xLGMkF4T93bTJHYqFSjQGTdzEhagOunwaKBADtbigSWb7P5+eGEpC+Kml+kG1WHtz1OwA3/dXcH/EIUiHUEAV2Qi5AAlwK+GIRdmsmMDbueF/WE2LqRZ3s8yPoyI9UC6o5jR2/XVwFQr/Iqb3ytNNY+zNdfrDQVseprYtfpI+JuqkKrZ46EqRAQgQ3eR0mAIKXODARoxfwQgFpL1wYmwW1FCXyWgUIav5Lp4c0ppSn9iu2N432wLQkspoGY48oD4M1ueeDW/XNW+ySw9SpNDsHKvlz4nBA7fCHb1gODsR03QEWwC3PyWSnf7+nbISWAviS801sa7NkUqw7s0NLEX6DmUM4= X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1148; 20:8YAjrLe99rP8AtG8eNWz6IIAGRzgDzjNzFUcfVLX3iVI3RtNP2XwrUT055jvzPbP4G5Ix3mYqG79GM6Tbl+ODo+igy6noQQa2nWxrOMavhldek0VpkEhinOhhFSVheh9nxT42B7FhovyhtyDoff0Ezz3e+m4wV1/2R0BhS6G9tdxDFP7kS1EvaBrqzi3KtD/NPltEyYz0bV/Jr1rEh0hux0FDzYIKDwVc2nRqjlaiawm+rIoxkb4h+CAb+WCzZKu X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2017 15:01:34.2658 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1148 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 v8 30/38] 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);