linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
	Anirudh Rayabharam <anrayabh@linux.microsoft.com>
Cc: Sean Christopherson <seanjc@google.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>,
	linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH RFC v1 0/5] KVM: VMX: Support TscScaling and EnclsExitingBitmap whith eVMCS
Date: Wed, 15 Jun 2022 14:49:10 +0200	[thread overview]
Message-ID: <20220615124915.3068295-1-vkuznets@redhat.com> (raw)

Enlightened VMCS v1 definition was updates to include fields for the
following features:
    - PerfGlobalCtrl
    - EnclsExitingBitmap
    - TSC scaling
    - GuestLbrCtl
    - CET
    - SSP

Add support for EnclsExitingBitmap and TSC scaling to KVM. PerfGlobalCtrl 
doesn't work correctly with Win11, don't enable it yet. SSP, CET and 
GuestLbrCtl are not currently supported by KVM.

RFC part: the change dropping SECONDARY_EXEC_TSC_SCALING from 
EVMCS1_UNSUPPORTED_2NDEXEC likely breaks migration for Hyper-V on KVM: in
case guest which started on a 'fixed' KVM and uses TSC multiplier feature
gets migrated to an older 'unfixed' KVM the feature will become unusable.
Unfortunately, eVMCS's version is still '1' so we probably need a new
CAP in KVM to make TSC scaling an explicit opt-in.

Vitaly Kuznetsov (5):
  x86/hyperv: Fix 'struct hv_enlightened_vmcs' definition
  x86/hyperv: Update 'struct hv_enlightened_vmcs' definition
  KVM: VMX: Define VMCS-to-EVMCS conversion for the new fields
  KVM: nVMX: Support several new fields in eVMCSv1
  KVM: VMX: Support TSC scaling with enlightened VMCS

 arch/x86/include/asm/hyperv-tlfs.h | 19 ++++++++++++++----
 arch/x86/kvm/vmx/evmcs.c           | 26 +++++++++++++++++++++++++
 arch/x86/kvm/vmx/evmcs.h           | 11 ++++-------
 arch/x86/kvm/vmx/nested.c          | 31 ++++++++++++++++++++++++++++++
 4 files changed, 76 insertions(+), 11 deletions(-)

-- 
2.35.3


             reply	other threads:[~2022-06-15 12:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-15 12:49 Vitaly Kuznetsov [this message]
2022-06-15 12:49 ` [PATCH RFC v1 1/5] x86/hyperv: Fix 'struct hv_enlightened_vmcs' definition Vitaly Kuznetsov
2022-06-15 12:49 ` [PATCH RFC v1 2/5] x86/hyperv: Update " Vitaly Kuznetsov
2022-06-15 12:49 ` [PATCH RFC v1 3/5] KVM: VMX: Define VMCS-to-EVMCS conversion for the new fields Vitaly Kuznetsov
2022-06-15 12:49 ` [PATCH RFC v1 4/5] KVM: nVMX: Support several new fields in eVMCSv1 Vitaly Kuznetsov
2022-06-15 12:49 ` [PATCH RFC v1 5/5] KVM: VMX: Support TSC scaling with enlightened VMCS Vitaly Kuznetsov

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=20220615124915.3068295-1-vkuznets@redhat.com \
    --to=vkuznets@redhat.com \
    --cc=anrayabh@linux.microsoft.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=wanpengli@tencent.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).