Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44867
b: refs/heads/master
c: 36241b8
h: refs/heads/master
i:
  44865: 344f6af
  44863: 19cb1ea
v: v3
  • Loading branch information
Avi Kivity authored and Linus Torvalds committed Dec 22, 2006
1 parent f238cc6 commit 9b6eb72
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0e859cacb0b01bdbe34b5200dd2457d4818248fa
refs/heads/master: 36241b8c7cbcc83e7fd534d25e1df8339db8244e
9 changes: 9 additions & 0 deletions trunk/drivers/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,8 @@ static int svm_create_vcpu(struct kvm_vcpu *vcpu)
memset(vcpu->svm->db_regs, 0, sizeof(vcpu->svm->db_regs));
init_vmcb(vcpu->svm->vmcb);

fx_init(vcpu);

return 0;

out2:
Expand Down Expand Up @@ -1387,6 +1389,10 @@ static int svm_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
save_db_regs(vcpu->svm->host_db_regs);
load_db_regs(vcpu->svm->db_regs);
}

fx_save(vcpu->host_fx_image);
fx_restore(vcpu->guest_fx_image);

asm volatile (
#ifdef CONFIG_X86_64
"push %%rbx; push %%rcx; push %%rdx;"
Expand Down Expand Up @@ -1496,6 +1502,9 @@ static int svm_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
#endif
: "cc", "memory" );

fx_save(vcpu->guest_fx_image);
fx_restore(vcpu->host_fx_image);

if ((vcpu->svm->vmcb->save.dr7 & 0xff))
load_db_regs(vcpu->svm->host_db_regs);

Expand Down

0 comments on commit 9b6eb72

Please sign in to comment.