Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754148AbdIFMy2 (ORCPT ); Wed, 6 Sep 2017 08:54:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35650 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753484AbdIFMyZ (ORCPT ); Wed, 6 Sep 2017 08:54:25 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 10328883B6 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=david@redhat.com Subject: Re: [PATCH] KVM: SVM: Do not issue virtual VMLOAD/VMSAVE supported-message To: Borislav Petkov , KVM Cc: LKML , Janakarajan Natarajan , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= References: <20170905170628.10211-1-bp@alien8.de> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Wed, 6 Sep 2017 14:54:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170905170628.10211-1-bp@alien8.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 06 Sep 2017 12:54:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1111 Lines: 41 On 05.09.2017 19:06, Borislav Petkov wrote: > From: Borislav Petkov > > There's no need to issue that everytime during boot - we have the > /proc/cpuinfo flag for people and software to query. > > Signed-off-by: Borislav Petkov > Cc: Janakarajan Natarajan > Cc: Paolo Bonzini > Cc: Radim Krčmář > --- > arch/x86/kvm/svm.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c > index 8dbd8dbc83eb..f25e5b930932 100644 > --- a/arch/x86/kvm/svm.c > +++ b/arch/x86/kvm/svm.c > @@ -1101,11 +1101,8 @@ static __init int svm_hardware_setup(void) > if (vls) { > if (!npt_enabled || > !boot_cpu_has(X86_FEATURE_V_VMSAVE_VMLOAD) || > - !IS_ENABLED(CONFIG_X86_64)) { > + !IS_ENABLED(CONFIG_X86_64)) > vls = false; > - } else { > - pr_info("Virtual VMLOAD VMSAVE supported\n"); > - } > } > > return 0; > Maybe go one step further and incorporate everything (+vls) into a single if statement? -- Thanks, David