Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp120360rwb; Thu, 22 Sep 2022 15:25:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5sLE9cSN1kto2ANkkfZm4qEKmjHrwY8H9sJvzbNuAQM/aEKYbH3/NhD0aTDlVL6OaKsY4Q X-Received: by 2002:a17:903:26ca:b0:176:d7ab:cd34 with SMTP id jg10-20020a17090326ca00b00176d7abcd34mr5385638plb.52.1663885544786; Thu, 22 Sep 2022 15:25:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663885544; cv=none; d=google.com; s=arc-20160816; b=bRMYBo+IgI7imii7PxR9ddRRbKePY84sqsy/R3g2Ql5FHDmSatAM/ixbqiYQB2D0wT s5YPbQbz7KkkL7inJDdUg6bFM2TU2uM2n1g71ytDgV4omVgcNGpfWmZ9hGWYXQ9+ET14 W4Ks7v6adIbax9jDjgGNscMRux6k/NeyhoFe+wc1kmDchJR/1eokqmf0QODFUTlwwI9F y5e/Ax4b49IfMpIpp2YTBdWbAaS3jrToaN9qF0IrB5h8embdGwVLCLhI8aGGy2WrDHfO 5Ikk3xllQTo+CavdIqwDONit9wOm3ksF0W3H1wD+GlHiH9kGixBE6mMuF6Ao9Hfg/jHT FARA== 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=aw1uFe/KmsNaxOq1kOqpDl2z0N4SrfAtYbjvbg4KNlA=; b=lnfhqP/B3M7k78p8ZBXl19836hY/vTqyYm5ovBOEIb36cb3GQ96f2prjmDPR9SN9Ri qukS7zOFa5Qdsl7HIsUVELzpArCiyeNJZBsM2UG27CLc2+0wNrkfNxrN3m0QStN2G2xZ 0jF+RydH5cmVdjA9fwty3wJ1xywRM91sEG9DKI28IGx/QhRCtPV2e1jljWzglBABijBQ 03zdjGoau+YwrFyxm0qLQjH275TFNS7lnZl/YS9bLapj5j/iqukY42P6ouRK/sCQ9XSQ 2lLf1U3boHEoMPiPAJM7z/ySgKa27cq3HESHtBqC4hq8pzURVNYKmsl7EqThksq+qS7h vN9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=fTDhXkfL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q7-20020aa79827000000b005303194bf1bsi6953302pfl.111.2022.09.22.15.25.33; Thu, 22 Sep 2022 15:25:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=fTDhXkfL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230365AbiIVWXp (ORCPT + 99 others); Thu, 22 Sep 2022 18:23:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229947AbiIVWXP (ORCPT ); Thu, 22 Sep 2022 18:23:15 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD655113B5B for ; Thu, 22 Sep 2022 15:22:22 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id b5so2389408pgb.6 for ; Thu, 22 Sep 2022 15:22:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=aw1uFe/KmsNaxOq1kOqpDl2z0N4SrfAtYbjvbg4KNlA=; b=fTDhXkfLZvNkuL4IaGwGto6ivJHDG5foWXr5fgBLomdHZi/ywaW10ym20Gfyr41fW/ 88NnUq6bEGanHt4XE7wkcUDOp66fBEsgXVr4ZrD69bQJ4iLIjUCR9fhTsHG2L7s8yW2W LjPS9U+YyX857M3y7lxVbFLz9Q76RY7/dh1tZSO6eexKvWnRib+f7yznEn0ZDBv4yP/5 0AzxzU3pvftuHszNx8a1zCAn82Y4eoP3M6A/8OqpGr9p4iyuQsgw3/8kvaYaiS1HFPlR sgrr/g3vxZ4d9xbAp3jsc1jM8a8L+OdF6lx/WBATWRgUGpVBG5qO8QyWN4tlw8oXSbgf vheQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=aw1uFe/KmsNaxOq1kOqpDl2z0N4SrfAtYbjvbg4KNlA=; b=F/BPCsUrLGkGZWI7fQcjmpPTZ38M8B77OrRyl+AMvemNEih7Qo1mWCQKSwzCIg8bZH pPPhqmczWZIYs+z3Rc6xr4++C4jGbysplwq/hsVY7eH7aOK3c5N5Vvg+p2x6xpVE6Mkl 5hYJBLIqBx/BRLr9w5n7Sa6uyf9EY9Y+LE4ypvk8hAeKvb4AH8OLsbt+RneNLkGOialN HCURgLtFu77MPeUI8Hs9m0ZgqQRo0lhJBxcBBQQIfnj3VypzR1Jp2cQ7fJBjOot4pE6O 0QT7AK3xALQCKvt/26ho5ivmbKNCOy8MkSnn+4Qx2/v7AtmFD3QLozAJ58FOudhWlKWC aTDQ== X-Gm-Message-State: ACrzQf3JPdHl3kDIfZsYxU1//AYA7DKBcfla2tyjN15uXV94DUfWXvMS OFsGz+aav2akcwzwojsc+9PhtQ== X-Received: by 2002:a05:6a00:170b:b0:547:3e11:914f with SMTP id h11-20020a056a00170b00b005473e11914fmr5865458pfc.34.1663885331265; Thu, 22 Sep 2022 15:22:11 -0700 (PDT) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id o64-20020a625a43000000b0053e9d14e51asm4953732pfb.98.2022.09.22.15.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 15:22:10 -0700 (PDT) Date: Thu, 22 Sep 2022 22:22:07 +0000 From: Sean Christopherson To: "Michael Kelley (LINUX)" Cc: KY Srinivasan , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , Paolo Bonzini , Vitaly Kuznetsov , "linux-hyperv@vger.kernel.org" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/4] x86/hyperv: Move VMCB enlightenment definitions to hyperv-tlfs.h Message-ID: References: <20220921201607.3156750-1-seanjc@google.com> <20220921201607.3156750-2-seanjc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 22, 2022, Michael Kelley (LINUX) wrote: > From: Sean Christopherson Sent: Wednesday, September 21, 2022 1:16 PM > > > > Move Hyper-V's VMCB enlightenment definitions to the TLFS header; the > > definitions come directly from the TLFS[*], not from KVM. > > > > No functional change intended. > > > > [*] https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/tlfs/datatypes/hv_svm_enlightened_vmcb_fields> > > Signed-off-by: Sean Christopherson > > --- > > arch/x86/include/asm/hyperv-tlfs.h | 22 +++++++++++++++++++ > > arch/x86/kvm/svm/hyperv.h | 35 ------------------------------ > > arch/x86/kvm/svm/svm_onhyperv.h | 3 ++- > > 3 files changed, 24 insertions(+), 36 deletions(-) > > delete mode 100644 arch/x86/kvm/svm/hyperv.h > > > > diff --git a/arch/x86/include/asm/hyperv-tlfs.h b/arch/x86/include/asm/hyperv-tlfs.h > > index 0a9407dc0859..4c4f81daf5a2 100644 > > --- a/arch/x86/include/asm/hyperv-tlfs.h > > +++ b/arch/x86/include/asm/hyperv-tlfs.h > > @@ -584,6 +584,28 @@ struct hv_enlightened_vmcs { > > > > #define HV_VMX_ENLIGHTENED_CLEAN_FIELD_ALL 0xFFFF > > > > +/* > > + * Hyper-V uses the software reserved 32 bytes in VMCB control area to expose > > + * SVM enlightenments to guests. > > + */ > > +struct hv_enlightenments { > > + struct __packed hv_enlightenments_control { > > + u32 nested_flush_hypercall:1; > > + u32 msr_bitmap:1; > > + u32 enlightened_npt_tlb: 1; > > + u32 reserved:29; > > + } __packed hv_enlightenments_control; > > + u32 hv_vp_id; > > + u64 hv_vm_id; > > + u64 partition_assist_page; > > + u64 reserved; > > +} __packed; > > + > > +/* > > + * Hyper-V uses the software reserved clean bit in VMCB. > > + */ > > +#define VMCB_HV_NESTED_ENLIGHTENMENTS 31 > > Is it feasible to change this identifier so it starts with HV_ like > everything else in this source code file, such as > HV_VMCB_NESTED_ENLIGHTENMENTS? It doesn't look like it is > used in very many places. Most definitely, IIRC it's used in only one spot.