Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4535256ybh; Tue, 6 Aug 2019 13:27:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjOHlZF6ggNHCQ1OiGlsvD/zTFsfQnLbmI6Wy2bWd2PHiP1zQcjC2lxTyF+xPfnA9uI7mB X-Received: by 2002:aa7:97bb:: with SMTP id d27mr5516173pfq.93.1565123267321; Tue, 06 Aug 2019 13:27:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1565123267; cv=pass; d=google.com; s=arc-20160816; b=wTjclsopgIZcG8IzkkhLYtXH++Bt93yg2KqunLelAb8O3YJjP/IU7FgSbxwcpFdin9 iFMhI0ZTEXHxXxyo4vG2X4vNmuNHqnwukw3HB7QnEutpAZ81Tdx1icpFAh3AhU2jCmpm A3tKSJApA/ck/99+xCYFrKxo+ZcYOGuQM9JkQD9ORYZiWP5UJP+aBARUpF+ZRDFBZIh7 +Y+Knfp5gEmmP+VUiYmFKxk7ISG2UdWh9UcHUNXGoDcAUMjUbZ3xKejTr3IV1Vow9yDt 4Obk5eyLzfPbU1sJWsloM+jx831IehyDv625jL8TULEKZaKctxrjxWBBBfeFnxHvI5Cl Kbuw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=7IGkLjPpS/zSYDGWQ2cgLZHa/giqNj0So6XUn+tZCoA=; b=VrhSaPdG9wNY5Tg3lZLB/vh0xjRVH8mPFJvTps0GAp9nhzUBCPwlWmHpQjTwfj8Bqb vN5yVj0xfnJdBuqAR7MIQ7DXxgAJ0zhkW5c0mXepuQvXsGafnOeqLW1mlmL6v+b+L3LJ 3kVELRattuCsoCiT09s/nvJwczAHSA6jAOxsFq5Xv6QESdu2ZMMHg6TwODLJq4AZcLFW T44xwzqkH6CWhbZ+W0CtrRPm8BRYF/TqyOGQfNKr0xWH4Yag70LsSrGazlkK+YVQFJlp bcVWdyOb1IN9hQYpdQWLiugEHKeKHY+jKqlOZOyggBBrCTNMz3hNjVSFAnX5l+/noqih /4wQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amdcloud-onmicrosoft-com header.b=HRs67MTZ; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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 g3si50122034pgo.241.2019.08.06.13.27.30; Tue, 06 Aug 2019 13:27:47 -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=HRs67MTZ; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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 S1726068AbfHFU04 (ORCPT + 99 others); Tue, 6 Aug 2019 16:26:56 -0400 Received: from mail-eopbgr770073.outbound.protection.outlook.com ([40.107.77.73]:41350 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725881AbfHFU04 (ORCPT ); Tue, 6 Aug 2019 16:26:56 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kcMRE2cMBOic/dOHcC8cak6LjjwFN1A1qDBjXy8Owp9uG8b5dkc16mgvMr41z7fqzXl5NsDpbByUP7aPNf25VKU3H85gXKbYHGlioO3ALlpQU/OD/YNHl0u85SScDViFC3nhR2Zwpd6INuqsRsCzZZbNQIjwvc+I/PkmIKBSThBoaNeaO6L3RH6+xSC4r3/UkAovnsvz6/8Yc9LQt+9BKpP8YcM59Yn7vynVE4/89F0USS9aDpyhTpHrOKkIMs4D4uo8QQrYQB6UB5CoHl+x1bx8SzSIa0Zr7bI4UzkbIDM0mnFZLTc+P4LZCMpRNdBLYgKaBEMQQaMneo6FVKHwyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7IGkLjPpS/zSYDGWQ2cgLZHa/giqNj0So6XUn+tZCoA=; b=UfTdwi4c0s2d6DTZAXRN9FfjwDTqLcA9s+IJ2L4TSj2h8ymroRTKRLFKUWA6i+HA/lwZ7XFpwzd/T4up9BviJOsCMg/zi8d7D7ZJyHWQVgmbFHkAcuahDl1JMqvXY0X7pYbyPVwV60SnevDfZ1Q7dZbrLPnUGN53p9hj2nt8Og8mIeywkpSwGCNX1ELwd1soSlInqaiO2QPg/6/TF3Xi9aaXozGpAq1a/SlcVSiv45VI4j+U1Vzw/jp7Glmcf6v2FzhpOtSftnWy5dpINW1Ms5MJJ9qdaFXKUU7X3iWeK4Nlo5ce9ZHe+U0E2gjmF2oN3FL2kHPmj8xz2Pei2s3lHw== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=amd.com;dmarc=pass action=none header.from=amd.com;dkim=pass header.d=amd.com;arc=none 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=7IGkLjPpS/zSYDGWQ2cgLZHa/giqNj0So6XUn+tZCoA=; b=HRs67MTZx9u4y4IQLCxmnUKPVamisFEDKxM9vNhOPNY4JdqbbCnk1fCeTJ+Q9Hv8hCzuuB8Oy8lzstB1lbGfJLjk9ZfFlfrmRj23vLaf47fP/fpPlOU8rjJljq02T1NBQDTJb9CuxH/8loLKQ5+/n6jwiROyFeHhKQuNYAwb5IE= Received: from DM6PR12MB3163.namprd12.prod.outlook.com (20.179.104.150) by DM6PR12MB3529.namprd12.prod.outlook.com (20.179.106.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.13; Tue, 6 Aug 2019 20:26:52 +0000 Received: from DM6PR12MB3163.namprd12.prod.outlook.com ([fe80::9c3d:8593:906c:e4f7]) by DM6PR12MB3163.namprd12.prod.outlook.com ([fe80::9c3d:8593:906c:e4f7%6]) with mapi id 15.20.2136.018; Tue, 6 Aug 2019 20:26:52 +0000 From: "Lendacky, Thomas" To: "Kirill A. Shutemov" , Andrew Morton , "x86@kernel.org" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Borislav Petkov , Peter Zijlstra , Andy Lutomirski , David Howells CC: Kees Cook , Dave Hansen , Kai Huang , Jacob Pan , Alison Schofield , "linux-mm@kvack.org" , "kvm@vger.kernel.org" , "keyrings@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Kirill A . Shutemov" Subject: Re: [PATCHv2 47/59] kvm, x86, mmu: setup MKTME keyID to spte for given PFN Thread-Topic: [PATCHv2 47/59] kvm, x86, mmu: setup MKTME keyID to spte for given PFN Thread-Index: AQHVR7N50JZUMg30+0GwscyLbLRscqbumx6A Date: Tue, 6 Aug 2019 20:26:52 +0000 Message-ID: References: <20190731150813.26289-1-kirill.shutemov@linux.intel.com> <20190731150813.26289-48-kirill.shutemov@linux.intel.com> In-Reply-To: <20190731150813.26289-48-kirill.shutemov@linux.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN4PR0501CA0013.namprd05.prod.outlook.com (2603:10b6:803:40::26) 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: 7960527e-446d-46f2-db0a-08d71aac6ac5 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:DM6PR12MB3529; x-ms-traffictypediagnostic: DM6PR12MB3529: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1247; x-forefront-prvs: 0121F24F22 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(376002)(396003)(39860400002)(136003)(346002)(189003)(199004)(36756003)(68736007)(7416002)(476003)(486006)(2616005)(71190400001)(71200400001)(11346002)(446003)(14454004)(4326008)(86362001)(316002)(478600001)(54906003)(31696002)(25786009)(6246003)(6436002)(305945005)(7736002)(26005)(66476007)(3846002)(64756008)(53546011)(66446008)(186003)(6116002)(110136005)(2906002)(6486002)(66556008)(229853002)(76176011)(102836004)(2501003)(66066001)(31686004)(66946007)(5660300002)(6512007)(53936002)(256004)(99286004)(81156014)(81166006)(386003)(52116002)(8676002)(6506007)(14444005)(8936002)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR12MB3529;H:DM6PR12MB3163.namprd12.prod.outlook.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: jPjow3QyH9EJwADFTNpzZbgFVaQpvj9QzYT8YMR8WojofdDX/GZWJCw5IFVGigJNfQaTmAtxdvyOQ00nkK/HiKBMIxIe/UO5jAAI12M2RH0HS0DsMcEBcU8F4cyW+RLkT7Ds+rr3lsoDYz3ktu1sY4/Zr7aXzKwq0e0qrT2uhWKxJ2zb+lfhYb2DXBNR7g7eqd1P4Iu5u84GN759SSe0Un4qgAEiiryqTxmUjwGLbt6yC7bwKmcCwvPlmzPFocof4/ejUB6CykkXchOmrkDlsIV0MBpVCiirLpAcmUS6eINz8UGqOxj0vO8KuEhhM8V2AJb15woKl5MPs2AZQzx1KEfusMqbnai73RUt2+l5SiCkp9OFT457XuvkFs3TTeSbuGxVwYsu8u0ZlMSz8AVogUHehKXCtfBpR8xUA5EbWKk= Content-Type: text/plain; charset="utf-8" Content-ID: <52FCCCB87C0C0148AD8C552201384C4E@namprd12.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7960527e-446d-46f2-db0a-08d71aac6ac5 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Aug 2019 20:26:52.6811 (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: DM6PR12MB3529 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gNy8zMS8xOSAxMDowOCBBTSwgS2lyaWxsIEEuIFNodXRlbW92IHdyb3RlOg0KPiBGcm9tOiBL YWkgSHVhbmcgPGthaS5odWFuZ0BsaW51eC5pbnRlbC5jb20+DQo+IA0KPiBTZXR1cCBrZXlJRCB0 byBTUFRFLCB3aGljaCB3aWxsIGJlIGV2ZW50dWFsbH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