From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-23.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29B9DC433ED for ; Wed, 7 Apr 2021 22:48:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E72C161182 for ; Wed, 7 Apr 2021 22:48:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229459AbhDGWs7 (ORCPT ); Wed, 7 Apr 2021 18:48:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbhDGWs7 (ORCPT ); Wed, 7 Apr 2021 18:48:59 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10FA4C061761 for ; Wed, 7 Apr 2021 15:48:49 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id ep1-20020a17090ae641b029014d48811e37so272130pjb.4 for ; Wed, 07 Apr 2021 15:48:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=DgfW8JkZp8Qfy9QcapA9CK3xFi7FRXqxeMqnc0ZjSZA=; b=lozHiKGrOvSj5vWVEWU6vNBRZnSyF48TAYdOso2PswCjmyZhwZBXkZGc/ckWbhY0JD 5d6nx9oTvGmZaR1fiwuJJ+rSbshXtvTx9z8hzgg/6CAiiQ0ONTcUYe8fj1M9FbPlgW1p /f9c2u1pmlrCDxwe7xvH5NJ0TZDSAgDPq6f+CtR4jonCuBQNyMn2heoKbKd6xdE4ROcD vgqxoPtS2d6QvFq6B9ZnNKok9/O1FZFnUbBjnfgkgi8pcpHOOes8E+Ofrd8uzqDEbuqI SVFEvaA+8mHedpFbwDMQqj4mUKj0axAb9KNeTGgATLr13GtXaKFg4A7Qcogb3YBGFVMG QzNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=DgfW8JkZp8Qfy9QcapA9CK3xFi7FRXqxeMqnc0ZjSZA=; b=MdNLbMxq/6/UcwDlmUpWru0158WissHG01uirAhv5MY7TILy7jSb0fdSKSj6xcE5cB infwp5Rhte8E4JErjTaCQ64Jwr2lQv8sl1xHAhOoHbjGg8y8YrfV23qOpinC5/x8Zs+P 9rZkDSM7N9nBRSl7MXvPnW9bVYhdoSGedTa29KQiF4JtXS2o0uilMoC4HRbMmhhKHi+g VKUxnNuIct/oCdQfLTKZ3nxM1+Su7zLp0Ucp9SppLoT+FiqmGmoz9bCzLclg+p6gUqYs OKtOftI2p4c/tEsuFo23voZIyeUzpQuWMb/4pdtlKRTZTTtXXDH1cHYmgVvw+Ys5DVsR f0dg== X-Gm-Message-State: AOAM531Frayc0MxcCkzeiwKD2MWGu1C3KqiO+xwmq88hEu75rhiH+au0 jZxPX9xTbL59GX5HoR51I8qqsg== X-Google-Smtp-Source: ABdhPJxTmfV8L6CJgni4FoJssUPZc3Xy1SafJcbvzYbeFJWQRji+q8p4TqkNynJ54BIJozxe8EIY8A== X-Received: by 2002:a17:90a:5d8f:: with SMTP id t15mr5393064pji.28.1617835728485; Wed, 07 Apr 2021 15:48:48 -0700 (PDT) Received: from google.com (240.111.247.35.bc.googleusercontent.com. [35.247.111.240]) by smtp.gmail.com with ESMTPSA id n16sm22358949pff.119.2021.04.07.15.48.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Apr 2021 15:48:47 -0700 (PDT) Date: Wed, 7 Apr 2021 22:48:44 +0000 From: Sean Christopherson To: Michael Kelley Cc: Vineeth Pillai , Tianyu Lan , Paolo Bonzini , vkuznets , Wanpeng Li , Jim Mattson , Joerg Roedel , Wei Liu , Stephen Hemminger , Haiyang Zhang , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , KY Srinivasan , "x86@kernel.org" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" Subject: Re: [PATCH 1/7] hyperv: Detect Nested virtualization support for SVM Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Wed, Apr 07, 2021, Michael Kelley wrote: > From: Vineeth Pillai Sent: Wednesday, April 7, 2021 7:41 AM > > > > Detect nested features exposed by Hyper-V if SVM is enabled. > > > > Signed-off-by: Vineeth Pillai > > --- > > arch/x86/kernel/cpu/mshyperv.c | 10 +++++++++- > > 1 file changed, 9 insertions(+), 1 deletion(-) > > > > diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c > > index 3546d3e21787..4d364acfe95d 100644 > > --- a/arch/x86/kernel/cpu/mshyperv.c > > +++ b/arch/x86/kernel/cpu/mshyperv.c > > @@ -325,9 +325,17 @@ static void __init ms_hyperv_init_platform(void) > > ms_hyperv.isolation_config_a, ms_hyperv.isolation_config_b); > > } > > > > - if (ms_hyperv.hints & HV_X64_ENLIGHTENED_VMCS_RECOMMENDED) { > > + /* > > + * AMD does not need enlightened VMCS as VMCB is already a > > + * datastructure in memory. We need to get the nested > > + * features if SVM is enabled. > > + */ > > + if (boot_cpu_has(X86_FEATURE_SVM) || > > + ms_hyperv.hints & HV_X64_ENLIGHTENED_VMCS_RECOMMENDED) { > > ms_hyperv.nested_features = > > cpuid_eax(HYPERV_CPUID_NESTED_FEATURES); > > + pr_info("Hyper-V nested_features: 0x%x\n", > > Nit: Most other similar lines put the colon in a different place: > > pr_info("Hyper-V: nested features 0x%x\n", > > One of these days, I'm going to fix the ones that don't follow this > pattern. :-) Any reason not to use pr_fmt?