From patchwork Tue Aug 1 15:56:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 9874919 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B2E4B6038F for ; Tue, 1 Aug 2017 16:01:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A465A200F5 for ; Tue, 1 Aug 2017 16:01:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 995F328712; Tue, 1 Aug 2017 16:01:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE990200F5 for ; Tue, 1 Aug 2017 16:01:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751746AbdHAP5o (ORCPT ); Tue, 1 Aug 2017 11:57:44 -0400 Received: from mail.skyhub.de ([5.9.137.197]:56502 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751295AbdHAP5I (ORCPT ); Tue, 1 Aug 2017 11:57:08 -0400 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id nf6l8XcMWL2G; Tue, 1 Aug 2017 17:57:07 +0200 (CEST) Received: from nazgul.tnic (89-25-53-1.ip.btc-net.bg [89.25.53.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id DB1A31EC0AC5; Tue, 1 Aug 2017 17:57:06 +0200 (CEST) Date: Tue, 1 Aug 2017 17:56:18 +0200 From: Borislav Petkov To: Janakarajan Natarajan , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , x86-ml Cc: lkml , kvm-ML , =?utf-8?B?SsO2cmcgUsO2ZGVs?= Subject: [PATCH] x86/cpufeature, kvm/svm: Shorten virtualized VMLOAD/VMSAVE flag Message-ID: <20170801155618.GA2870@nazgul.tnic> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.6.0 (2016-04-01) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Folks, in the future, please CC people from the output of scripts/get_maintainer.pl when touching cpufeatures.h. AFAICT, not even lkml was CCed, not to mention the mandatory x86@kernel.org for x86 patches. @tip people: this needs to go to urgent so that it gets corrected before 4.13 releases. Thanks. Acked-by: Radim Krčmář --- From: Borislav Petkov Subject: [PATCH] x86/cpufeature, kvm/svm: Shorten virtualized VMLOAD/VMSAVE flag "virtual_vmload_vmsave" is what is going to land in /proc/cpuinfo now for a single feature bit which is clearly too long. So call it like it is called in the processor manual. "v_vmload_vmsave" is a bit shorter, after all. We could go more aggressively here but having it the same as in the processor manual is advantageous. Signed-off-by: Borislav Petkov Cc: Janakarajan Natarajan Cc: Paolo Bonzini Cc: Radim Krčmář --- arch/x86/include/asm/cpufeatures.h | 2 +- arch/x86/kvm/svm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index ca3c48c0872f..091b11b181b7 100644 --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h @@ -286,7 +286,7 @@ #define X86_FEATURE_PAUSEFILTER (15*32+10) /* filtered pause intercept */ #define X86_FEATURE_PFTHRESHOLD (15*32+12) /* pause filter threshold */ #define X86_FEATURE_AVIC (15*32+13) /* Virtual Interrupt Controller */ -#define X86_FEATURE_VIRTUAL_VMLOAD_VMSAVE (15*32+15) /* Virtual VMLOAD VMSAVE */ +#define X86_FEATURE_V_VMLOAD_VMSAVE (15*32+15) /* Virtual VMLOAD VMSAVE */ /* Intel-defined CPU features, CPUID level 0x00000007:0 (ecx), word 16 */ #define X86_FEATURE_AVX512VBMI (16*32+ 1) /* AVX512 Vector Bit Manipulation instructions*/ diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 4d8141e533c3..0a7843a1498a 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -1100,7 +1100,7 @@ static __init int svm_hardware_setup(void) if (vls) { if (!npt_enabled || - !boot_cpu_has(X86_FEATURE_VIRTUAL_VMLOAD_VMSAVE) || + !boot_cpu_has(X86_FEATURE_V_VMLOAD_VMSAVE) || !IS_ENABLED(CONFIG_X86_64)) { vls = false; } else {