From: Paolo Bonzini Subject: Re: [PATCH v2 0/4] KVM: SVM: Virtual VMLOAD VMSAVE Date: Fri, 7 Jul 2017 10:41:54 +0200 Message-ID: <3c1a0bd1-13bb-a056-c5ef-73a1fa9e3767@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Radim Krcmar , Joerg Roedel To: Janakarajan Natarajan , kvm@vger.kernel.org Return-path: Received: from mail-wr0-f194.google.com ([209.85.128.194]:33445 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752525AbdGGImC (ORCPT ); Fri, 7 Jul 2017 04:42:02 -0400 Received: by mail-wr0-f194.google.com with SMTP id x23so6122354wrb.0 for ; Fri, 07 Jul 2017 01:42:02 -0700 (PDT) In-Reply-To: Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: 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