diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-08-07 05:49:45 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-10 03:46:34 -0400 |
commit | cda0ffdd862d36d0b054249ce920f00d1dbae037 (patch) | |
tree | 5478bfd6795a3e1faeb028f86ef4fcb9e1fac121 /arch/x86/kvm | |
parent | 410e4d573d9b7fbd134f9a47815b6ad517492a08 (diff) |
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 <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/svm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index be28a38db918..a1cfa7d57ab9 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) | |||
2602 | fs_selector = kvm_read_fs(); | 2602 | fs_selector = kvm_read_fs(); |
2603 | gs_selector = kvm_read_gs(); | 2603 | gs_selector = kvm_read_gs(); |
2604 | ldt_selector = kvm_read_ldt(); | 2604 | ldt_selector = kvm_read_ldt(); |
2605 | if (!is_nested(svm)) | 2605 | svm->vmcb->save.cr2 = vcpu->arch.cr2; |
2606 | svm->vmcb->save.cr2 = vcpu->arch.cr2; | ||
2607 | /* required for live migration with NPT */ | 2606 | /* required for live migration with NPT */ |
2608 | if (npt_enabled) | 2607 | if (npt_enabled) |
2609 | svm->vmcb->save.cr3 = vcpu->arch.cr3; | 2608 | svm->vmcb->save.cr3 = vcpu->arch.cr3; |