Received: by 10.223.176.5 with SMTP id f5csp2476234wra; Thu, 8 Feb 2018 15:00:12 -0800 (PST) X-Google-Smtp-Source: AH8x226cdCXXVQ6i6VRl7w+MRY0p4R+12K/3tY4qGPBycHlQq9k3v0D7cw8Ct5JmyrJbNexpoHwr X-Received: by 10.98.198.143 with SMTP id x15mr645776pfk.22.1518130812129; Thu, 08 Feb 2018 15:00:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518130812; cv=none; d=google.com; s=arc-20160816; b=M9EsC8nOoie5/oSA0CCv1JhcqQ7c/V3bjTtVgKgyj5K2y6oB0pwTqtZj0F8XoFRGx6 nLt2OdZEBYZWM7HidBoq6B8IkWjOnaDluqpabTWiNDMmtj5C5rErQaz8dcJc2/Om6EIz yjwqrbfTgW3lExSwBnZ5b1pj5Z67vIzzxZmC+ddDld7lGU/UoOC+ntj7iTWx+o/14in9 NlX6IANtnl3he4uQVJ5qTSaItMb8Cnrjj858WhJ0+wsESMNvA139AqokrU4P974vvVoh mlp4K8cw329XS4F7La8sWsQrYErCfzOK3knYY15simUR1rGv9MopdqlN3fBmAeqDZQDN Lpww== 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:mime-version :user-agent:message-id:date:cc:to:subject:from:dkim-signature :arc-authentication-results; bh=d62PTvGCoFZ8d9A7n6/ErMuw/qgalBd+s5Ru31nmB50=; b=1AJ19sHo3SODYo2o1kK1feFHuru7i+4Nr5NkmNAWWB3dnrCARxYib8Jh+qLb6sMKkE SQVCHdobFIirz6UMjvWVLzMjfuKlt7E2a9Noe84Sy+e4wqf4eS0laTMu8xSnNRaNijsi zZm3lH/WXXxdC5rbAatc/SaCVQalvnlOpG2bQ31mYm4FBSBiIf4QRyLG4tT/vGrUNv1z qnaA8LlBK9Jq+lveMyo11TKdWvh2cT1f3VNm4rqnUy5WOmFdmX8+QUBY75ss1cZpRFik 1ADY5l195GJQ+vTudtUZhCcc+x8DwWPC7zndObQUlc8gtHwuLd9L62bSU4Nzp1HOXPJl NAhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=sLpJc3+r; 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 b25si539942pgf.488.2018.02.08.14.59.56; Thu, 08 Feb 2018 15:00:12 -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=sLpJc3+r; 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 S1752240AbeBHW6p (ORCPT + 99 others); Thu, 8 Feb 2018 17:58:45 -0500 Received: from mail-by2nam01on0080.outbound.protection.outlook.com ([104.47.34.80]:21276 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751424AbeBHW6n (ORCPT ); Thu, 8 Feb 2018 17:58:43 -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=d62PTvGCoFZ8d9A7n6/ErMuw/qgalBd+s5Ru31nmB50=; b=sLpJc3+rMcUI3I88EGvZ1qQRX97LpY43Vyn+w8/wok/gXe4bB4KtotVkDP7yC7wKbS0x9JUMDigKn5x2vstiodoiRgrTp2Yme7kEjxS7wt+xPwOdufRBHbum2HN57gVMUMUB6+oBrqzL1bipbM2qFC4/ll7FLBR6BOAD5wnC8jw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Thomas.Lendacky@amd.com; Received: from tlendack-t1.amdoffice.net (165.204.77.1) by BN6PR12MB1139.namprd12.prod.outlook.com (10.168.226.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.10; Thu, 8 Feb 2018 22:58:39 +0000 From: Tom Lendacky Subject: [RFC PATCH 0/2] KVM: MSR-based features To: x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: Paolo Bonzini , Joerg Roedel , Borislav Petkov , Thomas Gleixner , Radim =?utf-8?b?S3LEjW3DocWZ?= Date: Thu, 08 Feb 2018 16:58:33 -0600 Message-ID: <20180208225833.22074.25995.stgit@tlendack-t1.amdoffice.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CO1PR15CA0091.namprd15.prod.outlook.com (10.175.177.11) To BN6PR12MB1139.namprd12.prod.outlook.com (10.168.226.141) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: cd6b2736-75c2-4e91-51cd-08d56f477ef4 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:BN6PR12MB1139; X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1139;3:8ZP/ZLn6eAjzkB3MKwaGtaRtjqpO2OG+3D1iGcfQEkYhXBvSwfoayYZcBZ3FJWCHXcd6KH15lncOLRyCV4wp6JobV7nS8FOoBAGoPaCcyLb181YCh+2gXIF2WQhM13hskiXKTPBEM0m/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v7oKqZWIqnHKu181XrmYHwfaJ3nhph5N1a2riwRjIQOimPy/4g7VAp5Zn8mcQS0NuCxwtL8T+c8YyWmwST/zhCBSnVpOmX2hYTHgUmGNNdXux6gcKW1i4LKC1IBr0a4ysv1fxYrKFVT73ZLsZr6y6tFGxnF5ZJNDqNYKQf5IpWxO3wJ1Lprt6dnrWSEafYrhwwPneIM8fqfLIUeJXM2;4:eKwyajrAtQ1zdHHhO9+xcv0DqsfoGFbNgJ003oc0OBC/SuIJtZEjhIKZLxKM7sdfX1nc/yvc0ODp98CSmMQu5XIiFn1X02kjiS+EyYf+E3pcqvcqa7KJJHBLLL5xYa1rf2jsHZblZuEBYfYNVptW7wVw4eOzI24ZVi1jRBwFDlxOkgaVvTmfFq3/FpxpXtB1Y1p+915UML6SWcdlNUsMOuW2qv6hanR04gnRspOSe4Hpu1RqI3xY6X2thW4hJNPoa/TTxQacPhH6DukF78OhVg== 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)(3231101)(2400082)(944501161)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:BN6PR12MB1139;BCL:0;PCL:0;RULEID:;SRVR:BN6PR12MB1139; X-Forefront-PRVS: 0577AD41D6 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(366004)(39380400002)(396003)(39860400002)(376002)(346002)(189003)(199004)(316002)(5660300001)(53416004)(2906002)(72206003)(66066001)(105586002)(230700001)(8936002)(68736007)(81166006)(478600001)(386003)(8676002)(83506002)(6506007)(81156014)(6666003)(69596002)(50466002)(16526019)(4326008)(26005)(53936002)(52116002)(23676004)(186003)(2486003)(106356001)(25786009)(47776003)(7696005)(97746001)(7736002)(55016002)(58126008)(97736004)(9686003)(54906003)(3846002)(6116002)(1076002)(86362001)(305945005)(103116003)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR12MB1139;H:tlendack-t1.amdoffice.net;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?MTtCTjZQUjEyTUIxMTM5OzIzOklMZmlsNFZ6NENwUVVXSXNLT3RNRDJPcEg2?= =?utf-8?B?S2x5Mk9HOS8wOW9CMG5UdHlaSmxDditBWnpjR0wvdzNDY3J0dVgzVm9rWWo5?= =?utf-8?B?bnprdS9vTkI3R3Rib0RMcFNBWGZ4TUlLK29kdkNSTkxOMTRFYU5SNDJJUU5N?= =?utf-8?B?b1J6SFlIazdycExwNzNBbkdzRCt3MWdUM3ZKMWF3YW1CQ05XaFQ5WW01RUY4?= =?utf-8?B?RmNtUXpjd3JBNmRmMXFueHFRQnJzS0hFM3U1a3krTHNFY0p0T3JJRmhTdzhv?= =?utf-8?B?R1RpNkhJbTZVNnhlQU9lUWVFWnVFQnF6Tm5Nc0Nha0YxT2xRR2p6T2FhNEU3?= =?utf-8?B?Zzc1azN6TjNHQjE5Z1Y5SGx0NThLK2E1TVNQY2lQVTV2aTJoRWExT1lUbG4y?= =?utf-8?B?cVZmeWhNZDJnWEJTL1JDbENDdWw4czFQcEpNM1Z0REVoR3g2RDVyVTBOZzJv?= =?utf-8?B?VVpsbGRiT0hCY3Jwc25WVzgrbkIvN3VQNnZPUVcwQWZ6UkM4SEFTUnJEWHhJ?= =?utf-8?B?cityMEsyb3NjQXF0TkxpT0VnTlFQYjk4VGlSY3YwZkE0dzJna1Q2Vkw3clNR?= =?utf-8?B?Z2ZkaEcwZTBHZEdyZkRoWVJKYzdsUlNIUVhibWVHZVhad2NHbXA1czJMbVhU?= =?utf-8?B?RmVsVC9UUlQ2OVJIK3lnVW12OUMrTDFBT3VKdmVPcmdhTU03YksxZC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1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1139;20:aMN8IMsVfZoSHOk0lqFuuYz+WX1muDaMEo6tzYI0U6iZgCB4AVfMpiZfAoyahB/nujB2NN6ycQA/Mkv8eVdyh0WZFVmNAM/JwSyMzyAMYfeltvJ0lQkBNse5OgxmDhKpC508cgs4HZXhZAC2Juw5VQWbuW2DMLMY4soGOSTZyJVUVuK+2bic57jf1nsiM1hrdMRaBe8lJpmRaz6h7Xs3cps/+Sww3CdwojV3KVsiRMJjhfFmfjaTLmdspQmX3Eah X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2018 22:58:39.1564 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cd6b2736-75c2-4e91-51cd-08d56f477ef4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1139 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. --- 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(-) -- Tom Lendacky