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=-14.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1,USER_IN_DEF_DKIM_WL autolearn=no 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 A48BBC433ED for ; Fri, 16 Apr 2021 16:10:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7E14F6113D for ; Fri, 16 Apr 2021 16:10:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239831AbhDPQK5 (ORCPT ); Fri, 16 Apr 2021 12:10:57 -0400 Received: from linux.microsoft.com ([13.77.154.182]:46378 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236350AbhDPQK4 (ORCPT ); Fri, 16 Apr 2021 12:10:56 -0400 Received: from [192.168.86.23] (c-73-38-52-84.hsd1.vt.comcast.net [73.38.52.84]) by linux.microsoft.com (Postfix) with ESMTPSA id 0378920B8001; Fri, 16 Apr 2021 09:10:28 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0378920B8001 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1618589431; bh=9MXNGr+OsMs3ZgwnW73MWJRCTLeAvuN7B4xa579GwLs=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=qq63LORblOaS7ZOylg8BPaRJrxFsJH4ALhgZg4EXBBxDzyX/HiLnpZQncAH56chNV gJbU+JREtUYqCHkoE/Nx2mAsemurEp4A0OlgpIrThG4eUwpscLCg7VbOX+pfh+QBzy jZMk27UwZrUCqJtIvt1lbj5hRk1tiYEotgHgO+Dc= Subject: Re: [PATCH v2 1/7] hyperv: Detect Nested virtualization support for SVM To: Vitaly Kuznetsov Cc: "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "K. Y. Srinivasan" , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, Lan Tianyu , Michael Kelley , Paolo Bonzini , Sean Christopherson , Wanpeng Li , Jim Mattson , Joerg Roedel , Wei Liu , Stephen Hemminger , Haiyang Zhang , viremana@linux.microsoft.com References: <9d12558549bc0c6f179b26f5b16c751bdfab3f74.1618492553.git.viremana@linux.microsoft.com> <871rba8wjj.fsf@vitty.brq.redhat.com> From: Vineeth Pillai Message-ID: Date: Fri, 16 Apr 2021 12:10:26 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <871rba8wjj.fsf@vitty.brq.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-hyperv@vger.kernel.org > It may make sense to expand this a bit as it is probably unclear how the > change is related to SVM. > > Something like: > > HYPERV_CPUID_NESTED_FEATURES CPUID leaf can be present on both Intel and > AMD Hyper-V guests. Previously, the code was using > HV_X64_ENLIGHTENED_VMCS_RECOMMENDED feature bit to determine the > availability of nested features leaf and this complies to TLFS: > "Recommend a nested hypervisor using the enlightened VMCS interface. > Also indicates that additional nested enlightenments may be available > (see leaf 0x4000000A)". Enlightened VMCS, however, is an Intel only > feature so the detection method doesn't work for AMD. Use > HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS.EAX CPUID information ("The > maximum input value for hypervisor CPUID information.") instead, this > works for both AMD and Intel. Thanks for the input. Will update the commit message in next revision. Thanks, Vineeth