From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 0/9] Add support for nested SVM (kernel) v3 Date: Fri, 19 Sep 2008 16:39:30 +0200 Message-ID: <20080919143930.GP24392@amd.com> References: <1221658886-14109-1-git-send-email-agraf@suse.de> <20080919143600.GO24392@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: kvm@vger.kernel.org, joro@8bytes.org, anthony@codemonkey.ws, avi@qumranet.com To: Alexander Graf Return-path: Received: from outbound-wa4.frontbridge.com ([216.32.181.16]:41023 "EHLO WA4EHSOBE002.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751503AbYISOjw (ORCPT ); Fri, 19 Sep 2008 10:39:52 -0400 Content-Disposition: inline In-Reply-To: <20080919143600.GO24392@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Sep 19, 2008 at 04:36:00PM +0200, Joerg Roedel wrote: > On Wed, Sep 17, 2008 at 03:41:17PM +0200, Alexander Graf wrote: > > To be usable, this patchset requires the two simple changes in the userspace > > part, that I sent to the list with the first version. > > > > Thanks for reviewing! > > Ok, with the patch attached applied on-top of your patches I got a > recent KVM running inside KVM. And it doesn't feel very slow :-) > I will do some benchmarks in the next days to get real numbers. The > patches look good so far. > But I think for now we should disable the feature by default and allow > enabling it from userspace until we are sure we don't introduce any > security hole and don't destroy migration with it. We can add a > -nested-virt parameter to qemu to enable it for the guest then. > Another thing missing is the SVM feature CPUID function. It is used to > find out the number of ASIDs available. But this is a minor issue as > long as we only run KVM inside KVM. Oh, forgot the patch. Here is it: >>From 15c4e38288cdaa6d142e94e77025dfd097d63a17 Mon Sep 17 00:00:00 2001 From: Joerg Roedel Date: Sat, 20 Sep 2008 00:30:25 +0200 Subject: [PATCH] KVM: nested-svm-fix: allow read access to MSR_VM_VR KVM tries to read the VM_CR MSR to find out if SVM was disabled by the BIOS. So implement read support for this MSR to make nested SVM running. Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 062ded6..7b91c74 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -1929,6 +1929,9 @@ static int svm_get_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 *data) case MSR_VM_HSAVE_PA: *data = svm->nested_hsave; break; + case MSR_VM_CR: + *data = 0; + break; default: return kvm_get_msr_common(vcpu, ecx, data); } -- 1.5.5.1 -- | AMD Saxony Limited Liability Company & Co. KG Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany System | Register Court Dresden: HRA 4896 Research | General Partner authorized to represent: Center | AMD Saxony LLC (Wilmington, Delaware, US) | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy