KVM: SVM: remove unnecessary is_nested check from svm_cpu_run
authorJoerg Roedel <joerg.roedel@amd.com>
Fri, 7 Aug 2009 09:49:45 +0000 (11:49 +0200)
committerAvi Kivity <avi@redhat.com>
Thu, 10 Sep 2009 07:46:34 +0000 (10:46 +0300)
This check is not necessary. We have to sync the vcpu->arch.cr2 always
back to the VMCB. This patch remove the is_nested check.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/svm.c

index be28a38db918624d73bae81468ee4e7816d0b81c..a1cfa7d57ab90d6d67b7cd4dd23a6547b0e15693 100644 (file)
@@ -2602,8 +2602,7 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
        fs_selector = kvm_read_fs();
        gs_selector = kvm_read_gs();
        ldt_selector = kvm_read_ldt();
-       if (!is_nested(svm))
-               svm->vmcb->save.cr2 = vcpu->arch.cr2;
+       svm->vmcb->save.cr2 = vcpu->arch.cr2;
        /* required for live migration with NPT */
        if (npt_enabled)
                svm->vmcb->save.cr3 = vcpu->arch.cr3;