Message ID | 1536234182-2809-3-git-send-email-brijesh.singh@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <kvm-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D1A8921 for <patchwork-kvm@patchwork.kernel.org>; Thu, 6 Sep 2018 11:44:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BCCD2A50E for <patchwork-kvm@patchwork.kernel.org>; Thu, 6 Sep 2018 11:44:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 702892A75B; Thu, 6 Sep 2018 11:44:21 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 032CE2A75A for <patchwork-kvm@patchwork.kernel.org>; Thu, 6 Sep 2018 11:44:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728021AbeIFQSq (ORCPT <rfc822;patchwork-kvm@patchwork.kernel.org>); Thu, 6 Sep 2018 12:18:46 -0400 Received: from mail-bn3nam01on0067.outbound.protection.outlook.com ([104.47.33.67]:46448 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727728AbeIFQSp (ORCPT <rfc822;kvm@vger.kernel.org>); Thu, 6 Sep 2018 12:18:45 -0400 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:X-MS-Exchange-SenderADCheck; bh=BdJUFBsYLNgYsE/wjTdOS5mKAPWVjyMJBQGIgs0NlnI=; b=XhoByKwM8QeFjQAjEkUdhh6mj3JR+4nlvZddACW2opAbOxqA7I4dAg3UgCRg7pSoeow5M8XvAEZlkw8ctwI9nOYsA9lWZEE1KA1Ch0uAB41ozUHXkhsRnRy7grh+3UuCQNX03+p2BWO7TOaoPSMsdlsxag1qByOAGylHdJOqbdA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from sbrijesh-desktop.amd.com (165.204.77.1) by BN7PR12MB2675.namprd12.prod.outlook.com (2603:10b6:408:29::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.18; Thu, 6 Sep 2018 11:43:30 +0000 From: Brijesh Singh <brijesh.singh@amd.com> To: x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: Brijesh Singh <brijesh.singh@amd.com>, Tom Lendacky <thomas.lendacky@amd.com>, Thomas Gleixner <tglx@linutronix.de>, Borislav Petkov <bp@suse.de>, "H. Peter Anvin" <hpa@zytor.com>, Paolo Bonzini <pbonzini@redhat.com>, Sean Christopherson <sean.j.christopherson@intel.com>, =?utf-8?b?UmFkaW0g?= =?utf-8?b?S3LEjW3DocWZ?= <rkrcmar@redhat.com> Subject: [PATCH v5 2/5] x86/mm: fix sme_populate_pgd() to update page flags Date: Thu, 6 Sep 2018 06:42:59 -0500 Message-Id: <1536234182-2809-3-git-send-email-brijesh.singh@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536234182-2809-1-git-send-email-brijesh.singh@amd.com> References: <1536234182-2809-1-git-send-email-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CY4PR03CA0002.namprd03.prod.outlook.com (2603:10b6:903:33::12) To BN7PR12MB2675.namprd12.prod.outlook.com (2603:10b6:408:29::29) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 27ac7bb2-5019-45bd-5c9e-08d613edf887 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:BN7PR12MB2675; X-Microsoft-Exchange-Diagnostics: 1;BN7PR12MB2675;3:gCaHFB8LkhXvFmB9W/WanrKpydGFT2lg76RkDDr7F1WRc31JwAHsYtiZS1ZrN62HaXXugvmVPWiR8ymb9s65X22pNz7MPAZgLVpsFny1nHLhnuhDDJA6qviBA8cHVICMOfn3Hu5u6bKW1zdp4m+58tp3rcaRC5KIWQK6OKLo5bk10QOmHm10LPQ6iFUKNOQdLXn5S69jJUg407GRW06WU0Z8HsLlel/fDADCDYoi9jTHR1ymNzjGzVeQRP3UHVp+;25:Ah1Th40zeBFKWk9wXvWo9z1g/UFoK3ZV+R3RJrtjI+nUlw9O03Sh7ptKtMTvfJGH6qGVRl3I0+vnTYPHrfuZM/rcz3+fjm2RwfAMl8zCOGB/CYJiXcJJKcQyrFCFfZZzaLP/gb1RVNA1+ULGRv0X64c+nGNMZ8fB/OWk/S2gqUCARj2rem9yQvKV/ranIkC2OeK/qsetO4btuDAMLFANq+YXFtBGEBqXUUqLFG/OX5ipnpeHd7o7IkVbLwK5V3GWBVIVQA1efd+nEnTe9fVIFp+sD+cI3fdDaoW8X9Y+DNfTBDXdGbIgQnVndU3YfTUfbP1NDQvphiSCNaKygwWCyQ==;31:cUWCMiSz7rYgrhJm1PDEbDeIRTqAgNpjQ9G0Kljmf/S9HRakiz+TLQ+Fsxd0W7jamIXPT37iyKiBkzgR9jTDYVU81eJURlRVCzjRHHxp/hI2yzpeQTT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XKA4milpgG X-Microsoft-Antispam-PRVS: <BN7PR12MB2675E34E7CD5A9F0D585C9B6E5010@BN7PR12MB2675.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(767451399110)(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(823301075)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699016);SRVR:BN7PR12MB2675;BCL:0;PCL:0;RULEID:;SRVR:BN7PR12MB2675; X-Forefront-PRVS: 0787459938 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(396003)(376002)(366004)(346002)(136003)(39860400002)(189003)(199004)(25786009)(47776003)(86362001)(14444005)(68736007)(66066001)(7736002)(6486002)(53416004)(106356001)(6666003)(5660300001)(3846002)(305945005)(4326008)(6116002)(36756003)(105586002)(26005)(7696005)(50466002)(52116002)(8676002)(11346002)(50226002)(956004)(446003)(2616005)(53936002)(2870700001)(97736004)(23676004)(478600001)(316002)(76176011)(186003)(16526019)(54906003)(81156014)(81166006)(2906002)(44832011)(476003)(15650500001)(386003)(8936002)(486006);DIR:OUT;SFP:1101;SCL:1;SRVR:BN7PR12MB2675;H:sbrijesh-desktop.amd.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BBN7PR12MB2675=3B23=3AZ1Jq7d8?= =?utf-8?q?tmUfBCRFFEH48S05f/0dyWp/k5QmbWr2EhxkWQUX2K25HuVGT9jPqd0Wo/EeoFNs+?= =?utf-8?q?wmbWLvjNIS2krNnyPZip1QYmxzrGK0ey/tRUqbf5l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z9QeN9rMuP4R4kz6Gnu49RtrLT67jRiM/y2UWXXtKa8/uawdlIRu9DNrs5rhXTlkAmlv0uQ==;5:nbo34QS7ljZQ3iDCyspnPpOv4ZRVBMoJe5ze49IDouTjeliMHBl+qGJNjI3iTHBO4HWKw06KwwKA/GvEsaOoQIJVajCPuwnpgxyLRlVI8EhSHuYwGBdvOmbi1SidDWpy1gA/niyUtTB6n3u8lKSmMbRUp0J39g+H4YBSy+6Ug90=;7:pTZJpUW1AVTRqGqwMy/i9nG5ZASuFcGe+Gn/IzaWlsorpT3d/0mh4QUuom+p9jjGci4oeW1l288rYl5IsM2Amf48iFb9PXrJqMHtu15rM197PoiZChgOJQqn6qihPgJhq4ZfFJLPqJZZmIveFg6U9x3s5aK2nMjt/GOdY4gmK1Mq5X4ek4aQns0+SE8fGWMBY8h/PwHMbyePTVdnYBjjPYx/bTISUxA4WKD4cqxO4lvfNmw+bZugH9rc12uWhoik SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN7PR12MB2675;20:9z0pnxNvzLUHBIB4NZ0a2GluCSuH5XQxukqRZGYEUgQykSZfnnnwLvGlOuhdaEfr2zEU33P+rB5L4QULP56nHgi2rVK2A8+BRY6CRXPHNmUbp2rVvw/w2sVweQTcrmX7HIG9D8SjB9KQ7mMmy4Q6INUjfPHO5ePmfkyd3BDGKV58n6G392/4lifW70uQPiGmFcW4HymZNElxICKE+TLgOmQOR6y0PQoJG5w0B045IqbdJRqF2sSVjcOay7uTS3n5 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2018 11:43:30.4488 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 27ac7bb2-5019-45bd-5c9e-08d613edf887 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR12MB2675 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: <kvm.vger.kernel.org> X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
x86: Fix SEV guest regression
|
expand
|
diff --git a/arch/x86/mm/mem_encrypt_identity.c b/arch/x86/mm/mem_encrypt_identity.c index 92265d3..7659e65 100644 --- a/arch/x86/mm/mem_encrypt_identity.c +++ b/arch/x86/mm/mem_encrypt_identity.c @@ -154,9 +154,6 @@ static void __init sme_populate_pgd_large(struct sme_populate_pgd_data *ppd) return; pmd = pmd_offset(pud, ppd->vaddr); - if (pmd_large(*pmd)) - return; - set_pmd(pmd, __pmd(ppd->paddr | ppd->pmd_flags)); } @@ -182,8 +179,7 @@ static void __init sme_populate_pgd(struct sme_populate_pgd_data *ppd) return; pte = pte_offset_map(pmd, ppd->vaddr); - if (pte_none(*pte)) - set_pte(pte, __pte(ppd->paddr | ppd->pte_flags)); + set_pte(pte, __pte(ppd->paddr | ppd->pte_flags)); } static void __init __sme_map_range_pmd(struct sme_populate_pgd_data *ppd)