Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5934894ybi; Wed, 12 Jun 2019 10:59:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNoa8PXB1dRpUPF+XSJWn65NOWWdsyqGO7V8Wr0q9H3Bh7YwJBd5ZVhM1e1wmuH9d5CMEL X-Received: by 2002:aa7:8817:: with SMTP id c23mr20571526pfo.146.1560362376171; Wed, 12 Jun 2019 10:59:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560362376; cv=none; d=google.com; s=arc-20160816; b=f/MSggi3tgLqSHmguZTM/cFf4c0r98OhUiS4K6ACiR/IqdJKB12FowREGvoivE7WcY wnBko8PjNGlO5L3uyJElpnt1sMSVpfrgesBmnhE4iKbKxGmtpGOtN7qEeZVg8wsDqiWO 3pdeaJfUIfYzAg2SV15GFJBZS3k1Wjl8iQJtc0mDbgoUwpXucUEHxE9FKsPcGvlZ648i QiJNgG3jkCMKvWtUSBTCggSccuGcTO2wssCSS5f6jeTejuLPqtVrwM1ZH7e/NNpsbQuu Muc7jX/ar8jPpSaJ8IIpBlFCmAf1th6IWsAVn4owPcnu8pGh7D9TaFdQas1me6KrPjDS YOTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=2SOFNSFj2twm4+B7LXL/o1af3auk7qxMHhBkVjNqjOU=; b=XLmnIg4/17ooZJjxKDiX/TxOR8jUTrVjR1obzkVqhf+rSVFx4eZ6NIzkqsL/imCJnS IcpU5wwTtvmBmdXKap7CZmhaeeJ7mVwM8o1MNAxv+us8mim6UpFpgYUuE3eLXy7w8DnC aSh3DrQXRq+kYElM4lxoNYlB9ILTg5eAjJl0e34K9AdzEAR98xK29NJwbsGTeiL7i8tK HPzGfM6ozkn/WqF02fu+VgeL9tGkJW+LDpEILR8Lb8CznRyKkIgMfQtKcz98G6gY5oWn 3QrvjFi5mDZ/vMdumDRvgWvlqwPM40igWFUE6NAMN7FC9yqpV6GNKNInrrEZwxd9Zyah 4tqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amdcloud-onmicrosoft-com header.b=NCxEzde7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b40si318313pla.49.2019.06.12.10.59.21; Wed, 12 Jun 2019 10:59:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amdcloud-onmicrosoft-com header.b=NCxEzde7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439269AbfFLNcc (ORCPT + 99 others); Wed, 12 Jun 2019 09:32:32 -0400 Received: from mail-eopbgr730052.outbound.protection.outlook.com ([40.107.73.52]:27910 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728141AbfFLNcc (ORCPT ); Wed, 12 Jun 2019 09:32:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2SOFNSFj2twm4+B7LXL/o1af3auk7qxMHhBkVjNqjOU=; b=NCxEzde7pMas1K8RUiHQbRGXVmDBdym0PyqHDzNrsDZkNpfMYnrd3Tp25k8nJCCwEQUlM9Q4kLU9Rf8qK4BhVf3uPzsDcailR8b6dJCGlAGnZB+w+F3nWaYR5wOimQNhdmsr4i2smu74Fc93tIk5XDpvDxKkCCQ4TmuAETddNJ8= Received: from DM6PR12MB3163.namprd12.prod.outlook.com (20.179.104.150) by DM6PR12MB3052.namprd12.prod.outlook.com (20.178.30.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.13; Wed, 12 Jun 2019 13:32:24 +0000 Received: from DM6PR12MB3163.namprd12.prod.outlook.com ([fe80::bcaf:86d4:677f:9555]) by DM6PR12MB3163.namprd12.prod.outlook.com ([fe80::bcaf:86d4:677f:9555%6]) with mapi id 15.20.1987.012; Wed, 12 Jun 2019 13:32:24 +0000 From: "Lendacky, Thomas" To: "linux-kernel@vger.kernel.org" , "x86@kernel.org" CC: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Baoquan He , Lianbo Jiang Subject: [PATCH] x86/mm: Create an SME workarea in the kernel for early encryption Thread-Topic: [PATCH] x86/mm: Create an SME workarea in the kernel for early encryption Thread-Index: AQHVISNEIgHKCEThME+IPHE9yhs80A== Date: Wed, 12 Jun 2019 13:32:23 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.17.1 x-clientproxiedby: SN6PR15CA0012.namprd15.prod.outlook.com (2603:10b6:805:16::25) To DM6PR12MB3163.namprd12.prod.outlook.com (2603:10b6:5:182::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Thomas.Lendacky@amd.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [165.204.77.1] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: db8d44ef-78ba-4369-3ce7-08d6ef3a6729 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:DM6PR12MB3052; x-ms-traffictypediagnostic: DM6PR12MB3052: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 0066D63CE6 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(136003)(396003)(39860400002)(376002)(366004)(199004)(189003)(71190400001)(14454004)(8676002)(5660300002)(86362001)(81156014)(2906002)(7416002)(25786009)(99286004)(6512007)(81166006)(50226002)(66066001)(186003)(54906003)(71200400001)(118296001)(478600001)(110136005)(486006)(476003)(2616005)(68736007)(4326008)(52116002)(8936002)(72206003)(316002)(36756003)(2501003)(305945005)(66556008)(26005)(6116002)(7736002)(14444005)(256004)(66446008)(66946007)(53936002)(64756008)(73956011)(6486002)(6506007)(102836004)(66476007)(6436002)(3846002)(386003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR12MB3052;H:DM6PR12MB3163.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: k92XB8TtTh3jKmYwHbAg7yw7Ic8sZUZFEqjMoOeuynHuCUsoRDPRgdqcRKhwdgYX+9ORxgJVIfqj5+zhZjhJioK8/HCnJcvWznV/9PWikD9L1GovOkfdva2yt5FVBiWVZmjk7evD+B32/YH9zZAu+VS4EdZeqyG46hr0rsyeA0FcyC2WRf0XW/6cYXqTfyw15cs9e6b2FRaAYRwHeRQLYvmq/JrPMHnlhKXInx5RsPmsPsGFhBP9ssKK6Rd1ylfSgtgL1aJwT81QTRoK0M1BzZa4bBbkId00ByadIk9g3egrb51xEx1Q7NBjYMisZ9FZdvxjKqF50EwwSPoMK0l0sJPMLxLc6sdlCfxkg1Q8mkBxjuERGawYC90PcqhB7k5awVkVrIMmW69oFhECyLiyZ2h23yETRzFc4soh/wVPhCs= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: db8d44ef-78ba-4369-3ce7-08d6ef3a6729 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jun 2019 13:32:23.9909 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: tlendack@amd.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3052 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org VGhlIFNNRSB3b3JrYXJlYSB1c2VkIGR1cmluZyBlYXJseSBlbmNyeXB0aW9uIG9mIHRoZSBrZXJu ZWwgZHVyaW5nIGJvb3QNCmlzIHNpdHVhdGVkIG9uIGEgMk1CIGJvdW5kYXJ5IGFmdGVyIHRoZSBl bmQgb2YgdGhlIGtlcm5lbCB0ZXh0LCBkYXRhLA0KZXRjLiBzZWN0aW9ucyAoX2VuZCkuICBUaGlz IHdvcmtzIHdlbGwgZHVyaW5nIGluaXRpYWwgYm9vdCBvZiBhIGNvbXByZXNzZWQNCmtlcm5lbCBi ZWNhdXNlIG9mIHRoZSByZWxvY2F0aW9uIHVzZWQgZm9yIGRlY29tcHJlc3Npb24gb2YgdGhlIGtl cm5lbC4NCkJ1dCB3aGVuIHBlcmZvcm1pbmcgYSBrZXhlYyBib290LCB0aGVyZSdzIGEgY2hhbmNl IHRoYXQgdGhlIFNNRSB3b3JrYXJlYQ0KbWF5IG5vdCBiZSBtYXBwZWQgYnkgdGhlIGtleGVjIHBh Z2V0YWJsZXMgb3IgdGhhdCBzb21lIG9mIHRoZS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