Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp452594pxb; Fri, 16 Apr 2021 09:28:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzn8vvtCJbaXK+UJV3p99oEPE80sK00In38OFmyxzfpuHBmEqs3qt0ZBPTtKhSARlcXTR15 X-Received: by 2002:aa7:df99:: with SMTP id b25mr11105774edy.190.1618590498007; Fri, 16 Apr 2021 09:28:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618590498; cv=none; d=google.com; s=arc-20160816; b=foWrsHE/ZKCzZvoSJendDoBwKOHcn/E0FUVnLdKVaWr4GAZENlTFJvTmrWnF+afMtd 4SjTw5BEbO0sa0iT3oMYxbeBnBToMgBvzdzZPwZIoo2XC/QuRk7pmUmOnOKdWCH8OJ0d Yd+472I/ZpQc+mztegDuHjhrUa/EOb+PxrpBMGFH709w58glNBmiDR1UG5Yloe1aUmXW 5wW49BbdobUvrEaIMrGkhVFtwVczD4sm2Y6nG6Yu4IjuBrdFyZ785vwR1mxZQVqmpntK HWqmymbTiTVui5Ibl4ieKG0iWtvr4fs9FH82JS8c2ixXF7AkB+Xd6LiDf5DA+uQUirkj 6P7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-filter; bh=9MXNGr+OsMs3ZgwnW73MWJRCTLeAvuN7B4xa579GwLs=; b=lAUGGKDwvEnGuRUPQmn44AIHnVwyfd2B7Dcnyv475WAH3Gjw3m5QFQAD4hO0wWHEh7 9RUQp0bkBw8RnnPzLjDv2faZfTY1K2XswifxO/aHrLt2vdf37QqclbRvoJFJtSBByvcl J1PLeSb3/GI8ji2uz51eDDXkS2KrPbWvvJWpsyeSc97f5Qp71NUFAhTGklwADo6LxSm8 6dq9JSV1rZCECD4LCFKF6vaLPBHo6zK2zFhjBfCcSWszSPvS3omy8s1PLXAOwNgvdZZQ Ido6JI4kBIiPNh5+FurhVj4lXDIbMETqS4hp/1djXcmDOcHJugXF2NY2jYMH9Qron7vm bZvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=qq63LORb; 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=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nb28si4024783ejc.303.2021.04.16.09.27.55; Fri, 16 Apr 2021 09:28:17 -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=@linux.microsoft.com header.s=default header.b=qq63LORb; 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=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239975AbhDPQK5 (ORCPT + 99 others); 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-kernel@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