Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180432
b: refs/heads/master
c: 923de3c
h: refs/heads/master
v: v3
  • Loading branch information
Jason Wang authored and Avi Kivity committed Feb 9, 2010
1 parent 0d72742 commit c6ab6e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 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: c93d89f3dbf0202bf19c07960ca8602b48c2f9a0
refs/heads/master: 923de3cf5bf12049628019010e36623fca5ef6d1
7 changes: 3 additions & 4 deletions trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ static void kvm_write_wall_clock(struct kvm *kvm, gpa_t wall_clock)
{
static int version;
struct pvclock_wall_clock wc;
struct timespec now, sys, boot;
struct timespec boot;

if (!wall_clock)
return;
Expand All @@ -685,9 +685,7 @@ static void kvm_write_wall_clock(struct kvm *kvm, gpa_t wall_clock)
* wall clock specified here. guest system time equals host
* system time for us, thus we must fill in host boot time here.
*/
now = current_kernel_time();
ktime_get_ts(&sys);
boot = ns_to_timespec(timespec_to_ns(&now) - timespec_to_ns(&sys));
getboottime(&boot);

wc.sec = boot.tv_sec;
wc.nsec = boot.tv_nsec;
Expand Down Expand Up @@ -762,6 +760,7 @@ static void kvm_write_guest_time(struct kvm_vcpu *v)
local_irq_save(flags);
kvm_get_msr(v, MSR_IA32_TSC, &vcpu->hv_clock.tsc_timestamp);
ktime_get_ts(&ts);
monotonic_to_bootbased(&ts);
local_irq_restore(flags);

/* With all the info we got, fill in the values */
Expand Down

0 comments on commit c6ab6e0

Please sign in to comment.