Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185951
b: refs/heads/master
c: 953899b
h: refs/heads/master
i:
  185949: d438530
  185947: f4ee821
  185943: 06c468d
  185935: 84b8d41
  185919: 4d33d18
v: v3
  • Loading branch information
Joerg Roedel authored and Marcelo Tosatti committed Mar 1, 2010
1 parent f762c4d commit a62eed2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 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: 4e47c7a6d714cf352b719db92a924b6ec487acc5
refs/heads/master: 953899b659adce62cbe83d6a7527550ab8797c48
18 changes: 10 additions & 8 deletions trunk/arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,14 +765,16 @@ static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
if (unlikely(cpu != vcpu->cpu)) {
u64 delta;

/*
* Make sure that the guest sees a monotonically
* increasing TSC.
*/
delta = vcpu->arch.host_tsc - native_read_tsc();
svm->vmcb->control.tsc_offset += delta;
if (is_nested(svm))
svm->nested.hsave->control.tsc_offset += delta;
if (check_tsc_unstable()) {
/*
* Make sure that the guest sees a monotonically
* increasing TSC.
*/
delta = vcpu->arch.host_tsc - native_read_tsc();
svm->vmcb->control.tsc_offset += delta;
if (is_nested(svm))
svm->nested.hsave->control.tsc_offset += delta;
}
vcpu->cpu = cpu;
kvm_migrate_timers(vcpu);
svm->asid_generation = 0;
Expand Down

0 comments on commit a62eed2

Please sign in to comment.