KVM: SVM: Ignore lower 12 bit of nested msrpm_pa
authorJoerg Roedel <joerg.roedel@amd.com>
Mon, 1 Mar 2010 14:34:40 +0000 (15:34 +0100)
committerAvi Kivity <avi@redhat.com>
Mon, 17 May 2010 09:15:16 +0000 (12:15 +0300)
These bits are ignored by the hardware too. Implement this
for nested svm too.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/svm.c

index ddea391..490bec1 100644 (file)
@@ -2070,7 +2070,7 @@ static bool nested_svm_vmrun(struct vcpu_svm *svm)
        svm->vmcb->save.dr6 = nested_vmcb->save.dr6;
        svm->vmcb->save.cpl = nested_vmcb->save.cpl;
 
-       svm->nested.vmcb_msrpm = nested_vmcb->control.msrpm_base_pa;
+       svm->nested.vmcb_msrpm = nested_vmcb->control.msrpm_base_pa & ~0x0fffULL;
        svm->nested.vmcb_iopm  = nested_vmcb->control.iopm_base_pa  & ~0x0fffULL;
 
        /* cache intercepts */