From: Joerg Roedel Date: Fri, 7 Aug 2009 09:49:45 +0000 (+0200) Subject: KVM: SVM: remove unnecessary is_nested check from svm_cpu_run X-Git-Tag: v2.6.32-rc1~693^2~32 X-Git-Url: http://ftp.safe.ca/?a=commitdiff_plain;h=cda0ffdd862d36d0b054249ce920f00d1dbae037;p=safe%2Fjmp%2Flinux-2.6 KVM: SVM: remove unnecessary is_nested check from svm_cpu_run 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 Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index be28a38..a1cfa7d 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -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;