Received: by 10.223.176.5 with SMTP id f5csp2481590wra; Thu, 8 Feb 2018 15:04:51 -0800 (PST) X-Google-Smtp-Source: AH8x2265R2LbO5uP9XgWKhiF+2uTCROST6nSzHWOlB17ODmB0qdteLd8ozb9QLy/Ij/HMGhN67qo X-Received: by 10.99.97.195 with SMTP id v186mr617698pgb.84.1518131091187; Thu, 08 Feb 2018 15:04:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518131091; cv=none; d=google.com; s=arc-20160816; b=YSgn0Lk6TCliy94/Rm2GK8xevgh54WEeucnW1NjkcoGiPBGGcn0iN1iLA3NeFH2CSr F/25MRSSizqoqmd5+5e2TLuATJ0a9GWhUJGIVlUNBp3b5eFB6qAB3gQa1JDj9q5YlnQE tqwaag3c9mnr7Ri/VXqrmCvRvKTcQwNQFkbOt1KfLA5yCmUz5oTuDPXuN1bL+1MYL2K/ Re1eGn3b8cidQh9KLM46WPvB841wxgdQ1YX1IIQai2v/MH+1wf+4kn11QKUqBEhq6zuB bstb/GQQ3cxLCmTJ7GB/MzQhi0Awmab8SvuM9IrAebfVTvROzyVjUiOXFegJ87GIIki4 ubsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject:dkim-signature:arc-authentication-results; bh=5tE13foq2m/QfjEQliRZOPZPDm5E+vyEjxm6OYRp00g=; b=t9ldDvFKCDATQ/NbmKnLFutOr8G82Ut44zEwzA6eplD5R/YhGMDSEmsPCjV193zTNR pgCcNntQ3iTv66G10qZEnAb6GMbQHKEA2tU8lBj/mETf5e63hU1weuniet7rh+41GbNk AkLvjMBRf5RUB50B9Mhv3ngIOQrRLMKcLe+jwxmkkl9qRJoU2QvGNOwXvRrppbiykHM+ EOuN6a0WuZKqRME/W8qGBqG2s4StMesbl1CCCj2yIsXzsjfQsfmJkkFyoJrIvah9vGmd b7dIbDA++Cm4cPjuqlPeGLY3VctlCwBd9juquAJG2APbZpbeAgRNJGbv3jiXNklttlFO o3Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=txAoZCwR; 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 o3-v6si611466pld.405.2018.02.08.15.04.18; Thu, 08 Feb 2018 15:04:51 -0800 (PST) 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-amd-com header.b=txAoZCwR; 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 S1752058AbeBHXDV (ORCPT + 99 others); Thu, 8 Feb 2018 18:03:21 -0500 Received: from mail-by2nam01on0052.outbound.protection.outlook.com ([104.47.34.52]:28704 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751079AbeBHXDT (ORCPT ); Thu, 8 Feb 2018 18:03:19 -0500 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=5tE13foq2m/QfjEQliRZOPZPDm5E+vyEjxm6OYRp00g=; b=txAoZCwRCaeP7fzeZYcJ/+Y5ZPFR7SJUI7V+NKa4w1j0Fs80K6kIktpW6ZOdgju18yBdFdeIvtPY1q1jzrAl6aBBXO3X7SQwJLBqDa0avOdReRpXNsQ08FjCV4co6kHLt3yyujmMKQ86NzI8b66873SLkQTn77sWNOYxZ98v+/Y= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Thomas.Lendacky@amd.com; Received: from [10.236.65.116] (165.204.78.1) by CY4PR12MB1141.namprd12.prod.outlook.com (2603:10b6:903:36::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.464.11; Thu, 8 Feb 2018 23:03:17 +0000 Subject: Re: [RFC PATCH 0/2] KVM: MSR-based features From: Tom Lendacky To: x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini Cc: Joerg Roedel , Borislav Petkov , Thomas Gleixner , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= References: <20180208225833.22074.25995.stgit@tlendack-t1.amdoffice.net> Message-ID: <4732839a-48bb-9183-be4e-0b7233094265@amd.com> Date: Thu, 8 Feb 2018 17:03:04 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180208225833.22074.25995.stgit@tlendack-t1.amdoffice.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: CO1PR15CA0050.namprd15.prod.outlook.com (2603:10b6:101:1f::18) To CY4PR12MB1141.namprd12.prod.outlook.com (2603:10b6:903:36::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: fa2ffc6e-4674-48ec-d3ae-08d56f482478 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:CY4PR12MB1141; X-Microsoft-Exchange-Diagnostics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mV91kCjHFjwfSOceakD8IQC99zA9L5RUCOZiFadsrdxviXdvsQDmUFDwftzYOS+vWV//uIOyBa3kOMsnPrXAKAQ3TuE/i0/CynoEGXrk6kjEDK5dUk6SZBmp702l0jhZOgMWX0Or4Pu150naP94uHopSQDp9FqCAKWptChmZsdEzPwmkM/oN2F3G8D2rMjb6MQO6CKMZfqz62KiZIEk4LX1ZMtnAI3AAeCdRLErqf3Zprz2/hBZfqfYQpXAzrlaeCjum7R5xB8X+OBw+VsPUSdQIxXD7Vfy/ANvR5Fuuo52qR1ngZez4QedmA0K5WjUrsnY9kevZ8ethQ7lCcCNqDTNIFea9EVRL;4:LLOfX0VCWzxTL4SK6OiLjQX8ORAa+iiUW7BM0TZ/EGzhs00ErB2iB+pbC/y4c9ifeFha+3lPJrUZ3mlKTTY1n+w6Fr9rc5A2fZvYPj79xgB8tUAznoNFgzm3rKLy1XROdISjfimAIQPkmbb26mVFGOBBnrVWyYVdEkBcZ1hnmPfPOM8ce6CmiDLAXk1KtbaRdjGXS6F0qfpqP6kBAjmQe2zFV3nkFo20EKDFQDUQ2y1XsqiFztQaju385Md1gNCYuZEfoU7I2Jv5piyqrerlgA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231101)(2400082)(944501161)(6055026)(6041288)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(6072148)(201708071742011);SRVR:CY4PR12MB1141;BCL:0;PCL:0;RULEID:;SRVR:CY4PR12MB1141; X-Forefront-PRVS: 0577AD41D6 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(346002)(376002)(396003)(366004)(39380400002)(39860400002)(189003)(199004)(72206003)(316002)(6116002)(16526019)(6666003)(4326008)(386003)(186003)(5660300001)(76176011)(2906002)(25786009)(64126003)(58126008)(65826007)(3260700006)(97736004)(53546011)(3846002)(77096007)(50466002)(26005)(6246003)(16576012)(36756003)(54906003)(65956001)(65806001)(81166006)(81156014)(2486003)(53936002)(86362001)(8676002)(66066001)(52116002)(305945005)(23676004)(47776003)(6916009)(52146003)(2950100002)(229853002)(478600001)(31696002)(8936002)(7736002)(105586002)(68736007)(230700001)(6486002)(106356001)(31686004)(83506002)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1141;H:[10.236.65.116];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxMTQxOzIzOjU5TStETnd3UlBXNnV4ZlhtQkJaMjhVc1Bu?= =?utf-8?B?Mm5MM0VsRGFyUkFJby8yaGpHQ1FNTVF1YWJPYmFoUi9Mc1RNK2xBNUFGQlEx?= =?utf-8?B?ZWNpU09tTkV4aGpyZCsrWlZVNjZ5dWNaZmlod0hBNmZNYTJTa2laV3MvNzBn?= =?utf-8?B?UG9OSlA5N3drbFFteldyMnM3TjhsbDZndG9ubDhiTkhjc2Z4Rk1SdnIyUzM4?= =?utf-8?B?b1FMSmlGclJ1a1MydWFIQjh2ZEN5TEJSbUFIOWI3ZFdXdmF2NjFhQ2lqakhi?= =?utf-8?B?K2NERFZNU2NtRWN6Q3llbU1ISTBBSmNoSHNIdExLdm1QWXQ1amp2b2R3bjRE?= =?utf-8?B?MXUvUFcvelErSjFvYVR6TDNZcktmOXdFSXZoVUZVd1lybUQrYlFHekI1QVFu?= =?utf-8?B?VXJnbUU4akEyaEE1dnBFVWFldjhmdjByeW1EbzVKeE9vdmdDaXJmci93MEZt?= =?utf-8?B?eVFsOU9obVZKZXE3Um53c2JHcGFYR0xxS3VteHNkOWsvbW9sSmJyYnBjVTVD?= =?utf-8?B?T0t3YjNKQlZxUzJET0RodCt0VDJM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WA+JjlXz0aaWHYquKEN40AhM+lAlGqWAmdkTNNftCkdUnVtv5VHRorR+jEvSRoamjM1bdQFfsYrj4x7zyiIs0231d8euLkO6QzEps=;24:NJ0JHdicsm8tf0sezvc+eK8Qbildv87ymikqx5jrsvqUKUCfGZCWoLnuTiMDmbbgP8HM8twKXL2PsAAtY3qBy8+gyZV1UDF7q+EhQCMChLY=;7:qXJrHCsX42cLPDjiRWObq+nluLnNhzKJkocvF2Xli6HxXndCORTXL8TO+LtDtC87Pp6oB7AWamPuIfG7E96UyY0hDYEvIMBwOwnDf2ks8gybfu5wbIK1UcDwIAJMFHCjRFlG3ThjOtz150xdbtabxS7gxvuN54uQrRiP0mK0xIMJprk/0ZeJPVx8KAq92AA+nwpchq9u/1wkNyqgkT2xkvTcvOnFxmRpaMie0T91CsPgAkb8iz6r0ZzC5UkZyx/S SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1141;20:mP5bFLaULWzE1OGMGkAAe4GZjStI/SKqtrXp156Y+GaWdE6pI10IeT2JB0M1JF58ta3H0yDBwBcrm5w58nY2Apex8tLUqe+mNCr1+A6bCyzer3S7XRp24aqyx1pshAea3yAnoZq55USuFEfVku5Zg+JXMB/JDgOnD0pCAjCJ+2aYsP5Fy+yEPGfBRi71Ldoz5dbPn0KOjPKnJ3+0XFQh8MGUKsxmkGgU5Lxl0ozECofbYm10cXboaCXEHGGsCsDX X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2018 23:03:17.0676 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fa2ffc6e-4674-48ec-d3ae-08d56f482478 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1141 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/8/2018 4:58 PM, Tom Lendacky wrote: > The following series implements support within KVM for MSR-based features. > The first patch creates the MSR-based feature framework used to initialize > and retrieve the MSR-based features. The second patch adds support that > will allow a guest to determine if the LFENCE instruction is serializing > on AMD processors. > > This series is based on the next branch. > Paolo, Let me know if this is the direction you were thinking of for MSR-based features. Thanks, Tom > --- > > Tom Lendacky (2): > KVM: x86: Add a framework for supporting MSR-based features > KVM: SVM: Add MSR feature support for serializing LFENCE > > > arch/x86/include/asm/kvm_host.h | 1 > arch/x86/kvm/svm.c | 16 +++++ > arch/x86/kvm/x86.c | 114 ++++++++++++++++++++++++++++++++++++++- > include/uapi/linux/kvm.h | 1 > 4 files changed, 130 insertions(+), 2 deletions(-) >