Re: [PATCH] KVM: SVM: Do not issue virtual VMLOAD/VMSAVE supported-message

From: David Hildenbrand
Date: Wed Sep 06 2017 - 08:54:32 EST


On 05.09.2017 19:06, Borislav Petkov wrote:
> From: Borislav Petkov <bp@xxxxxxx>
>
> 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 <bp@xxxxxxx>
> Cc: Janakarajan Natarajan <Janakarajan.Natarajan@xxxxxxx>
> Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> Cc: Radim KrÄmÃÅ <rkrcmar@xxxxxxxxxx>
> ---
> 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