public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Janakarajan Natarajan <Janakarajan.Natarajan@amd.com>
To: kvm@vger.kernel.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Radim Krcmar <rkrcmar@redhat.com>, Joerg Roedel <joro@8bytes.org>,
	Janakarajan Natarajan <Janakarajan.Natarajan@amd.com>
Subject: [PATCH v2 0/4] KVM: SVM: Virtual VMLOAD VMSAVE
Date: Thu,  6 Jul 2017 15:50:43 -0500	[thread overview]
Message-ID: <cover.1499289568.git.Janakarajan.Natarajan@amd.com> (raw)

This patchset adds support for the Virtual VMLOAD VMSAVE feature. This
feature allows the VMLOAD and VMSAVE instructions to be executed in the
Guest mode and not require a #VMEXIT. The value in the RAX for VMLOAD
and VMSAVE is treated as a guest physical address and is translated to
the host physical address and then the instruction does its normal
operation.

This feature is enabled by setting bit 1 at position B8h in the VMCB. This
bit is set only if the hypervisor has nested paging enabled, is in 64-bit
mode and has support for the Virtual VMLOAD VMSAVE feature. Any page
faults during this will result in a normal #VMEXIT with nested page fault
as the exit code.

The advantage of this feature will be the greatly reduced number of world
switches to support the VMLOAD and VMSAVE instructions by the outermost
hypervisor at Current Privilege Level (CPL) 0.

This has been tested with Xen, Hyper-V and KVM as the nested hypervisors.

v1->v2:
* Added module parameter for Virtual VMLOAD VMSAVE and set its default
  state to TRUE.

Janakarajan Natarajan (4):
  KVM: SVM: Prepare for new bit definition in lbr_ctl
  KVM: SVM: Rename lbr_ctl field in the vmcb control area
  KVM: SVM: Add Virtual VMLOAD VMSAVE feature definition
  KVM: SVM: Enable Virtual VMLOAD VMSAVE feature

 arch/x86/include/asm/cpufeatures.h |  1 +
 arch/x86/include/asm/svm.h         |  5 ++++-
 arch/x86/kvm/svm.c                 | 34 +++++++++++++++++++++++++++++-----
 3 files changed, 34 insertions(+), 6 deletions(-)

-- 
2.7.4

             reply	other threads:[~2017-07-06 20:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-06 20:50 Janakarajan Natarajan [this message]
2017-07-06 20:50 ` [PATCH v2 1/4] KVM: SVM: Prepare for new bit definition in lbr_ctl Janakarajan Natarajan
2017-07-06 20:50 ` [PATCH v2 2/4] KVM: SVM: Rename lbr_ctl field in the vmcb control area Janakarajan Natarajan
2017-07-06 20:50 ` [PATCH v2 3/4] KVM: SVM: Add Virtual VMLOAD VMSAVE feature definition Janakarajan Natarajan
2017-07-06 20:50 ` [PATCH v2 4/4] KVM: SVM: Enable Virtual VMLOAD VMSAVE feature Janakarajan Natarajan
2017-07-26  9:41   ` Joerg Roedel
2017-07-07  8:41 ` [PATCH v2 0/4] KVM: SVM: Virtual VMLOAD VMSAVE Paolo Bonzini

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=cover.1499289568.git.Janakarajan.Natarajan@amd.com \
    --to=janakarajan.natarajan@amd.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.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