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 <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to