Received: by 10.223.185.116 with SMTP id b49csp986131wrg; Fri, 16 Feb 2018 10:20:09 -0800 (PST) X-Google-Smtp-Source: AH8x226qJotjMF5RzzIXXctWH5yYsyS/E/MVHH0cwyeolOdnOXGv4NAIcH4wOVtzoKRmkkgWpaOe X-Received: by 10.167.130.88 with SMTP id e24mr6817187pfn.169.1518805209441; Fri, 16 Feb 2018 10:20:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518805209; cv=none; d=google.com; s=arc-20160816; b=Iy4eChm1jLZ74sqMBMNOl4hhV4GRwiZe37PAWC2woHCbwNpKfBtKxxusHoeLzriDEh SErh4NXfVxlK9zuij7pUshkTvoErWVnE4EwsahTP0CIkwTz0z2QT1nxCi8A1kaFnCB67 Z/vVeJX8KLgswO/WV+Ol/kqGO2xmcgAfkMK1eXkHZ8q6b+tCKaGB/WzvjIiNpKeee4b2 0/86f/IzVk4glr3F1yvNbzZ4U3SYlW5BO00hSFLgSYIGwGk+QZYmodXlID6QHRgzDMjT LFhkPIwRtszw008cAO0nuv2vhSN1y+ozRTXITtbirIis2SWJ5XGesFg3NKxkthpNgruA JodA== 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=z5YV5igB65HtGcICXvqEpvbMWWrISelBUKgTU1sSB9k=; b=mt9K8V16U6wpstl3uzu0x9+3/atjT4WWyTgkIgc2JI/YBnbkiVnOfsCOBX1nxbNeye bVKN89xg+Tc8xKuDfUEUHf1Amk+ouNs9oXhyuqqLRc0AOOuP3SaxgFPvsZu1jNv//TDs QOvGmUbiPYMhbWlJblnvw+Wz3PvjYpukq+OUjTmQIo0YoinZtokgPNgJpzAGnJCS30uf 264a/1+sntiI3JXqjBGn49My2HdEoLWgfbRN2WQW5A1axWSey3WgpxWZVvZJjLto9AwU KZEAS1dS70551WTQlwW4QFdXcDg7f58vEMP4f6PEzYB5b+A85drAdFTM2FSjInT/S/Fl FFFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=G1JiHx6d; 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 u66si1760034pgc.651.2018.02.16.10.19.54; Fri, 16 Feb 2018 10:20:09 -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=G1JiHx6d; 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 S1756615AbeBOXMH (ORCPT + 99 others); Thu, 15 Feb 2018 18:12:07 -0500 Received: from mail-by2nam03on0047.outbound.protection.outlook.com ([104.47.42.47]:19376 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756565AbeBOXME (ORCPT ); Thu, 15 Feb 2018 18:12:04 -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=z5YV5igB65HtGcICXvqEpvbMWWrISelBUKgTU1sSB9k=; b=G1JiHx6dHys4qrpGewtrS5Yf1Aby4HVD+W+fIlUMOS4rD6do2/bXtiNF8TNlDlohn+zcb+7NheWF/P5aZtud5C5PtDZWPJ1fBI2kqRiJJQprZq4kh+6U0DzR9154I6qSa/kDtW/eNwnyivxLOv7XNHDlGv8TGJ3k/VpWQDaJWzY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Thomas.Lendacky@amd.com; Received: from tlendack-t1.amdoffice.net (165.204.77.1) by MWHPR12MB1152.namprd12.prod.outlook.com (2603:10b6:300:e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.506.18; Thu, 15 Feb 2018 23:12:00 +0000 From: Tom Lendacky Subject: [PATCH v2 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, 15 Feb 2018 17:11:57 -0600 Message-ID: <20180215231156.31016.79657.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: MWHPR10CA0062.namprd10.prod.outlook.com (2603:10b6:300:2c::24) To MWHPR12MB1152.namprd12.prod.outlook.com (2603:10b6:300:e::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b856e604-04ce-44ca-b725-08d574c984ea X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:MWHPR12MB1152; X-Microsoft-Exchange-Diagnostics: 1;MWHPR12MB1152;3:WhvcCum42glkKxjoO/bGDnsML+KYP3gl5CIAylXfnrXS8pyvtTEwzb6OuE9AVBAmv9/uZz/AYF9Hg9bi++SNMsd1DkoGLz/vwgTSZOAeBR7kKSfUEFCgpqw6iobAG4DrVFnNMOTj0wAAO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T5RYUWKWED68ZJYhj3K0b2OF8TkpjrSuIvLURn4yK39g1wVeQm2ZMr3l7wKUf8tTglb2OAiz+5gYTqGH8xN0mY4OdlQHmrlHlTEhYLIy8vy7u2MlXeuAdna9milXPyBKxySNaGNvjAZ1rILOOtpS3SmArah+PdHJRZHyGsqk6tTIUJJELdRNV7P/4dc2TOkghoBkEyo;4:KwNDsvJ2gzj8GDOYLuQr11zx5hjFNBKoIReXKFVJYGneb2rIFGF/RSjCALwyWK0OOVp5xnoQMce+PebpZ5s62n7likzwL7wQRueRYXKNe8o1t+B/tqRtQpbO9KllSOxCOuoP0n/qWnBBicrQxqjWD7UbD4SMLQPblqJDVXCux6Z3LyatJVauResS9yoCm4fv0eSCPn2/VZBAxmNKY/Uw32Mq4tF1TPkyUtd6KmDrNz7xnnDeES6i882DOf4TnZOwy/Z0SDFG9yJHfMkzuSBKQZXID+VufmWZs0MJ/qq4JyjG7FoVjUpkPnxZDrBpQSzo X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(84791874153150); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231101)(944501161)(3002001)(10201501046)(6055026)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:MWHPR12MB1152;BCL:0;PCL:0;RULEID:;SRVR:MWHPR12MB1152; X-Forefront-PRVS: 058441C12A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(39860400002)(396003)(346002)(39380400002)(376002)(366004)(199004)(189003)(230700001)(9686003)(55016002)(47776003)(106356001)(66066001)(50466002)(8676002)(83506002)(25786009)(478600001)(8936002)(4326008)(316002)(103116003)(305945005)(1076002)(54906003)(3846002)(6116002)(72206003)(53416004)(26005)(81156014)(386003)(81166006)(966005)(58126008)(6506007)(16526019)(7696005)(68736007)(105586002)(52116002)(86362001)(97736004)(7736002)(186003)(2906002)(23676004)(6666003)(69596002)(2486003)(97746001)(6306002)(53936002)(5660300001);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR12MB1152;H:tlendack-t1.amdoffice.net;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxMTUyOzIzOmNPeU03MHIyc1Qva3paWjlLRmQxdE9hQ2tl?= =?utf-8?B?Tnp6WVF2SG9BM1lXMDBNcDJBakpETU1qSkxGTmxMYlViTVZqUEpvSzVEWVY3?= =?utf-8?B?aEpTNTFXOFBsOTZyTnU1MlNNWjUwTTcyMHhob1M4VmJkU0FiL3pBNWNYNTZ5?= =?utf-8?B?eVZHbTQ2NCtrRjcza2RqcHlPeEdLN1YzbmtpYXlWUkt0OGRaZC91eXlGNEF4?= =?utf-8?B?WHFUTlJXbUJlNGJXNjNFZ0RiYmE4cVlvWWdBK1F0dXBaalBHWjArRGtDbk1R?= =?utf-8?B?UVlCVjhNWm1kOWxaenl5YzgvVDlKMmYrZHAyWWNzeDlCdzVJazZXVDVrbU1l?= =?utf-8?B?YnFYbHNUUmtIbTFqOFhubDNMWDdKRGRNQ0JXOSt1b1UxQmxBQ2JXaDhkbG9N?= =?utf-8?B?QmZwVHpySU9tdjBHbld0ajJvNnMwb1FueWxTR1NWYTdmSWthOGpUVGZFMCs3?= =?utf-8?B?OGlLRXJDS05KMk1xWEZjSU1kY2k3WitCWXc2bkRJS2MyOFFBK3lQTmo2VDVM?= =?utf-8?B?NXN3SFdRZmVpdEs0Ny96eFE1Q3JMeVVnVFF4c09ML1YwZUFXMC80WkJpeUd5?= =?utf-8?B?c25XeEVxdWh1Slh2RE1QemczZm4xcUU1T0VSU0w1cWw2VDRMQ1FjTHZ6V3N1?= =?utf-8?B?N2JsbzV5M0xBNHMzblp2d2ZCd2JxalNsd1pJeW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2HPVJJiNHqKmp SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;MWHPR12MB1152;20:ODGLMw39LSnjdGdoXGFMsWTy65hzQ1tZZH42dS/IuPiCTK21nFEG98y5b9SXfq0mjwZZ5plj1rDesKjp5ooluYg/IOJnCz1l0yqbrz3uAkXZYk9kxCJsMV8lugnezSSmktcAoHJmG2TmwVuynI3CvsdkcD/IxcGWd6z1rW+wL/FwuZBnRvS3j/ERxlIo0Aal/6BKOAKBW+07pod3z9u3Z/Atk7pJb+R6vR0gnpEHzj6fuy9MWSEgQc0N+RrD8eLf X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2018 23:12:00.4079 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b856e604-04ce-44ca-b725-08d574c984ea X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1152 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 retrieve the available MSR-based features. The second patch makes use of the framework to allow a guest to determine if the LFENCE instruction is serializing on AMD processors. This series is based on the master branch of the KVM git tree. https://git.kernel.org/pub/scm/virt/kvm/kvm.git --- Tom Lendacky (2): KVM: x86: Add a framework for supporting MSR-based features KVM: SVM: Add MSR-based feature support for serializing LFENCE Documentation/virtual/kvm/api.txt | 47 +++++++++++++++++++++++++++++++++ arch/x86/include/asm/kvm_host.h | 2 + arch/x86/include/uapi/asm/kvm.h | 1 + arch/x86/kvm/svm.c | 43 +++++++++++++++++++++++++++++++ arch/x86/kvm/x86.c | 52 +++++++++++++++++++++++++++++++++++++ include/uapi/linux/kvm.h | 4 +++ 6 files changed, 149 insertions(+) -- Tom Lendacky