Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp948076pxf; Wed, 7 Apr 2021 15:50:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxETuvdtK7n9CAK6EmmSBfs3B/R4gzL0s6DisxpfqEavDP8qpwgHfZd/IaspbM8H1N3rhdW X-Received: by 2002:a17:903:22d1:b029:e7:1052:a979 with SMTP id y17-20020a17090322d1b02900e71052a979mr5088966plg.16.1617835853787; Wed, 07 Apr 2021 15:50:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617835853; cv=none; d=google.com; s=arc-20160816; b=Nvli3LjivABioKo4zj4fgCoo+PlfLJk1NpEqAtvjIlcRIMx1GX6AICHenf1UJ/v6FI P3AdBgARlAft1Ahc+KIYCtEDC71hApIL7z36BMUbLQ4z7ygJWl1mePTkjXvn+PpyUaQV fTn08h77GpevejnrbFAGtsMbsob/uA5Q36axVXzOg7Zo2LNDnqa5alwEZtlMgZ3F7rKn VVwHDFfwTUzXy0PoM8A428oeBXB6zqXx5LSxGWiS+cWJttdlrGrIAXdytRvWrwgH9ckD Z6qd1VY/lTHDGYSSURQ4s86jjon5pRR0GfqC/4NIcbgAockw/PC9rjpFJRTQOj0LhKQ5 c/vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DgfW8JkZp8Qfy9QcapA9CK3xFi7FRXqxeMqnc0ZjSZA=; b=OHSbHakFyDzP0xHp01ODeSEhBqlRC2En5KMSB/0et/BjwZxkKzFsGmWxQOVdw6y5oK iUQ5wNU9hiS65lMeCxrIMbVSJt4WlUZjcziMyPmpre4MfT1zOm4zf4qz+Sru493xtmtS vyH1UGXgJvnOzR3i9J7N9naHSun34FGm46Mqo0Ca7tzISphwD/KnGFWiH/8N05aLqRhB UutRHivlLw18poRe9aCzpptxlrf0eptRepzjg9JB1cDvYNyNrpRqNXgYwTGp0nxNL+hO TqZlX/3Omgw6iVdRqLCpwfiLkJ9HiPK2kYotnrvz9ZNeYTkFpEgaQaX/86lef7xh2YFX sUKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=lozHiKGr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l67si24850487pga.362.2021.04.07.15.50.40; Wed, 07 Apr 2021 15:50:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=lozHiKGr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229600AbhDGWtA (ORCPT + 99 others); Wed, 7 Apr 2021 18:49:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbhDGWs7 (ORCPT ); Wed, 7 Apr 2021 18:48:59 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EFEFC061760 for ; Wed, 7 Apr 2021 15:48:49 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id z22-20020a17090a0156b029014d4056663fso307491pje.0 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=W2opxRtarZUYaSWE0EczYOOqIpEkRhuorsNB4tWT4bTQUiS1F0nOEdhiTUrZSNx+1t qHQTSn/uWLz94KBysDsdLteejAUfuGozB4EnM8eq3gEOO7P+AWNMHt4XmlbrzyK214ZY +iCiol+bL4OkSC+gX6bX74vB+VN6n95wrBX5wXnwtwkarm+2Pf46oNyX84Y86GeC5ONZ YYRCMxt6qPowA+YLfIMnqWsaMLFVug6gZSP/AOIFTlKvGP6M1v8HUK4UugQoXIR5r0fd DIHlie61nenYt5ayllghxu16Nmngo29ituMSDnIxsF7+dvSPMiX9TtAvqM3KTCbsvEHQ 4b0Q== X-Gm-Message-State: AOAM531YFtW1UVYqnB2ercWvqqzstRGmdKYU+px5JdBPyiO3xQtaMe2x s1vwrq3SiIIPyZ1ivLOhfl537A== 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: linux-kernel@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?