Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197806
b: refs/heads/master
c: 2be4fc7
h: refs/heads/master
v: v3
  • Loading branch information
Joerg Roedel authored and Avi Kivity committed May 17, 2010
1 parent b2569c2 commit 2ef9250
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2041a06a50a2ef4062c8454482aa06e25f6cccde
refs/heads/master: 2be4fc7a02c368dcfda83a386a5101c211b9535e
15 changes: 6 additions & 9 deletions trunk/arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1799,10 +1799,7 @@ static int nested_svm_vmexit(struct vcpu_svm *svm)
nested_vmcb->save.gdtr = vmcb->save.gdtr;
nested_vmcb->save.idtr = vmcb->save.idtr;
nested_vmcb->save.cr0 = kvm_read_cr0(&svm->vcpu);
if (npt_enabled)
nested_vmcb->save.cr3 = vmcb->save.cr3;
else
nested_vmcb->save.cr3 = svm->vcpu.arch.cr3;
nested_vmcb->save.cr3 = svm->vcpu.arch.cr3;
nested_vmcb->save.cr2 = vmcb->save.cr2;
nested_vmcb->save.cr4 = svm->vcpu.arch.cr4;
nested_vmcb->save.rflags = vmcb->save.rflags;
Expand Down Expand Up @@ -2641,6 +2638,11 @@ static int handle_exit(struct kvm_vcpu *vcpu)

trace_kvm_exit(exit_code, vcpu);

if (!(svm->vmcb->control.intercept_cr_write & INTERCEPT_CR0_MASK))
vcpu->arch.cr0 = svm->vmcb->save.cr0;
if (npt_enabled)
vcpu->arch.cr3 = svm->vmcb->save.cr3;

if (unlikely(svm->nested.exit_required)) {
nested_svm_vmexit(svm);
svm->nested.exit_required = false;
Expand Down Expand Up @@ -2668,11 +2670,6 @@ static int handle_exit(struct kvm_vcpu *vcpu)

svm_complete_interrupts(svm);

if (!(svm->vmcb->control.intercept_cr_write & INTERCEPT_CR0_MASK))
vcpu->arch.cr0 = svm->vmcb->save.cr0;
if (npt_enabled)
vcpu->arch.cr3 = svm->vmcb->save.cr3;

if (svm->vmcb->control.exit_code == SVM_EXIT_ERR) {
kvm_run->exit_reason = KVM_EXIT_FAIL_ENTRY;
kvm_run->fail_entry.hardware_entry_failure_reason
Expand Down

0 comments on commit 2ef9250

Please sign in to comment.