On 06/07/2017 22:50, Janakarajan Natarajan wrote: > 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(-) Reviewed-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>