From 6c8dca5d53f95009d4fff00195bf38f277dc4366 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 27 Jul 2007 13:42:52 +1000 Subject: Provide timespec to guests rather than jiffies clock. A non-periodic clock_event_device and the "jiffies" clock don't mix well: tick_handle_periodic() can go into an infinite loop. Currently lguest guests use the jiffies clock when the TSC is unusable. Instead, make the Host write the current time into the lguest page on every interrupt. This doesn't cost much but is more precise and at least as accurate as the jiffies clock. It also gets rid of the GET_WALLCLOCK hypercall. Also, delay setting sched_clock until our clock is set up, otherwise the early printk timestamps can go backwards (not harmful, just ugly). Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds --- drivers/lguest/lg.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/lguest/lg.h') diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h index 269116eee85f..64f0abed317c 100644 --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h @@ -256,6 +256,7 @@ unsigned long get_dma_buffer(struct lguest *lg, unsigned long key, /* hypercalls.c: */ void do_hypercalls(struct lguest *lg); +void write_timestamp(struct lguest *lg); /*L:035 * Let's step aside for the moment, to study one important routine that's used -- cgit v1.2.3