Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274731
b: refs/heads/master
c: fdb9eb9
h: refs/heads/master
i:
  274729: eaa6dd1
  274727: 78979d3
v: v3
  • Loading branch information
Jeremy Fitzhardinge committed Sep 26, 2011
1 parent f3e3e7c commit f008b9c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 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: eec07a9ecf428a680d72dc7f2428ea8bed80b84d
refs/heads/master: fdb9eb9f155bfc0f8dc2fc88f90448b30c78ad97
16 changes: 15 additions & 1 deletion trunk/arch/x86/xen/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,22 @@ static unsigned long xen_get_wallclock(void)

static int xen_set_wallclock(unsigned long now)
{
struct xen_platform_op op;
int rc;

/* do nothing for domU */
return -1;
if (!xen_initial_domain())
return -1;

op.cmd = XENPF_settime;
op.u.settime.secs = now;
op.u.settime.nsecs = 0;
op.u.settime.system_time = xen_clocksource_read();

rc = HYPERVISOR_dom0_op(&op);
WARN(rc != 0, "XENPF_settime failed: now=%ld\n", now);

return rc;
}

static struct clocksource xen_clocksource __read_mostly = {
Expand Down

0 comments on commit f008b9c

Please sign in to comment.