All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: "Michael Kelley (LINUX)" <mikelley@microsoft.com>
Cc: KY Srinivasan <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/4] x86/hyperv: Move VMCB enlightenment definitions to hyperv-tlfs.h
Date: Thu, 22 Sep 2022 22:22:07 +0000	[thread overview]
Message-ID: <YyzgD0xp/Ki9a3jK@google.com> (raw)
In-Reply-To: <BYAPR21MB1688D04068DBA520366DA205D74E9@BYAPR21MB1688.namprd21.prod.outlook.com>

On Thu, Sep 22, 2022, Michael Kelley (LINUX) wrote:
> From: Sean Christopherson <seanjc@google.com> 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 <seanjc@google.com>
> > ---
> >  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.

  reply	other threads:[~2022-09-22 22:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 20:16 [PATCH 0/4] x86/hyperv: KVM: VMCB enlightenment cleanups Sean Christopherson
2022-09-21 20:16 ` [PATCH 1/4] x86/hyperv: Move VMCB enlightenment definitions to hyperv-tlfs.h Sean Christopherson
2022-09-22 22:18   ` Michael Kelley (LINUX)
2022-09-22 22:22     ` Sean Christopherson [this message]
2022-09-27 10:11       ` Vitaly Kuznetsov
2022-09-21 20:16 ` [PATCH 2/4] KVM: selftests: Move "struct hv_enlightenments" to x86_64/svm.h Sean Christopherson
2022-09-21 20:16 ` [PATCH 3/4] KVM: SVM: Add a proper field for Hyper-V VMCB enlightenments Sean Christopherson
2022-09-21 20:16 ` [PATCH 4/4] x86/hyperv: KVM: Rename "hv_enlightenments" to "hv_vmcb_enlightenments" Sean Christopherson
2022-09-22 22:21   ` Michael Kelley (LINUX)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YyzgD0xp/Ki9a3jK@google.com \
    --to=seanjc@google.com \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kvm@vger.kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikelley@microsoft.com \
    --cc=pbonzini@redhat.com \
    --cc=sthemmin@microsoft.com \
    --cc=vkuznets@redhat.com \
    --cc=wei.liu@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.