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=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 4CFDAC43470 for ; Thu, 8 Apr 2021 15:24:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C32161103 for ; Thu, 8 Apr 2021 15:24:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232221AbhDHPZD (ORCPT ); Thu, 8 Apr 2021 11:25:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231765AbhDHPZB (ORCPT ); Thu, 8 Apr 2021 11:25:01 -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 2D479C061761 for ; Thu, 8 Apr 2021 08:24:49 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id j6-20020a17090adc86b02900cbfe6f2c96so1589118pjv.1 for ; Thu, 08 Apr 2021 08:24: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=eq6Itc9aMiGMsim8WMHVwgalEukilZgAEStTZoS6ofQ=; b=Ws1ziVf1pL/fFefKj9jo0zyWYm3rscnZH7xWcUVj7d7hOwPQ2zCLCi/G59RoNdlxDF R4YrUFf83zW0yw6vX9POslVVw1pGYIFl7wLG9AtM097bxq3O32wSDDGSYzar0/j0cR/B BGKteoOVjjOZUcPY503PAj4/d0QlWyOJbQl1roVlf9Uy3Vl/BI4CRRFNqALE7Za4N2cx +/KosYABy2h3fwdmF1Cvucjf4dbmNVAQoHPZFN/6IVPJIxz1OD6VJ8aCH8QV+3r+qatE ZcZaDds1lD4sKrU1z+CL0IloRD19KqnMdC2+6C6VoWAYRELbVqTM7cEeCQg50vTmhZtX 5HNw== 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=eq6Itc9aMiGMsim8WMHVwgalEukilZgAEStTZoS6ofQ=; b=Q5TGA0qm0HFqgdHlryWTrahoeLdDv6pmoN4uF8gZZaTguYJQHoS/p0wCEIYl3olkm1 MJkmaGwhyqLG8r4kSe931XiosBqN0gC8K9z57NlFVR+gXAIYwrZdrC6ReD3FzPP6UhV8 iRsYneh8pFGiH5jH7t6+P5qNNU0m/kOb6Mwq8BtzSjdyNEI1fJagxQqhI6kQxDbPSkjK dKffcFW8ZY10L9YZJQAgBdyyGBivBZrmgjnmT/O1OtR4jjc31ZRyocQoTwTx4Vccpjee RUFoI8u8LD7Vwn7fcC4U7GHDnelHC60HRaL9UmIjIAMPgS3zfHA9uG8qSmo1S/4mqOu/ TcuQ== X-Gm-Message-State: AOAM531Kr4qN7SpOAfgMPu4Pb1JHFK9vHDjcyzlERGct96/tNbjJhS/b NGT5d3qoRZ+CMOLsrZcIbaKjjA== X-Google-Smtp-Source: ABdhPJyEuEnbYSjOZscxK5PLwE9AEUgL/8wG4Tau3gpnma1pMGX7qkuX05AdiIrzN13uyWEnok00DQ== X-Received: by 2002:a17:902:988d:b029:e8:dd65:e2b5 with SMTP id s13-20020a170902988db02900e8dd65e2b5mr8342923plp.36.1617895488546; Thu, 08 Apr 2021 08:24: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 f20sm8362398pfv.126.2021.04.08.08.24.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Apr 2021 08:24:47 -0700 (PDT) Date: Thu, 8 Apr 2021 15:24:44 +0000 From: Sean Christopherson To: Vineeth Pillai Cc: Vitaly Kuznetsov , "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 , Wanpeng Li , Jim Mattson , Joerg Roedel , Wei Liu , Stephen Hemminger , Haiyang Zhang Subject: Re: [PATCH 1/7] hyperv: Detect Nested virtualization support for SVM Message-ID: References: <87lf9tavci.fsf@vitty.brq.redhat.com> 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 Thu, Apr 08, 2021, Vineeth Pillai wrote: > Hi Vitaly, > > On 4/8/21 7:06 AM, Vitaly Kuznetsov wrote: > > - if (ms_hyperv.hints & HV_X64_ENLIGHTENED_VMCS_RECOMMENDED) { > > + /* > > + * AMD does not need enlightened VMCS as VMCB is already a > > + * datastructure in memory. > > Well, VMCS is also a structure in memory, isn't it? It's just that we > > don't have a 'clean field' concept for it and we can't use normal memory > > accesses. Technically, you can use normal memory accesses, so long as software guarantees the VMCS isn't resident in the VMCS cache and knows the field offsets for the underlying CPU. The lack of an architecturally defined layout is the biggest issue, e.g. tacking on dirty bits through a PV ABI would be trivial. > Yes, you are right. I was referring to the fact that we cant use normal > memory accesses, but is a bit mis-worded. If you slot in "architectural" it will read nicely, i.e. "VMCB is already an architectural datastructure in memory".