Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197830
b: refs/heads/master
c: 9ed3c44
h: refs/heads/master
v: v3
  • Loading branch information
Avi Kivity committed May 19, 2010
1 parent 24c16b7 commit a40d1d0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: 8facbbff071ff2b19268d3732e31badc60471e21
refs/heads/master: 9ed3c444ab8987c7b219173a2f7807e3f71e234e
12 changes: 10 additions & 2 deletions trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,14 +754,22 @@ static int do_set_msr(struct kvm_vcpu *vcpu, unsigned index, u64 *data)

static void kvm_write_wall_clock(struct kvm *kvm, gpa_t wall_clock)
{
static int version;
int version;
int r;
struct pvclock_wall_clock wc;
struct timespec boot;

if (!wall_clock)
return;

version++;
r = kvm_read_guest(kvm, wall_clock, &version, sizeof(version));
if (r)
return;

if (version & 1)
++version; /* first time write, random junk */

++version;

kvm_write_guest(kvm, wall_clock, &version, sizeof(version));

Expand Down

0 comments on commit a40d1d0

Please sign in to comment.