From ad8d8f3bc61ec712dd141e1029ae68c47fadc4a7 Mon Sep 17 00:00:00 2001 From: Glauber de Oliveira Costa Date: Mon, 7 Jan 2008 11:05:28 -0200 Subject: lguest: per-vcpu lguest timers Here, I introduce per-vcpu timers. With this, we can have local expiries, needed for accounting time in smp guests Signed-off-by: Glauber de Oliveira Costa Signed-off-by: Rusty Russell --- drivers/lguest/lg.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/lguest/lg.h') diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h index a4ebd415fa2..7da7b3f68da 100644 --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h @@ -47,6 +47,9 @@ struct lg_cpu { /* If a hypercall was asked for, this points to the arguments. */ struct hcall_args *hcall; u32 next_hcall; + + /* Virtual clock device */ + struct hrtimer hrt; }; /* The private info the thread maintains about the guest. */ @@ -95,9 +98,6 @@ struct lguest struct lguest_arch arch; - /* Virtual clock device */ - struct hrtimer hrt; - /* Pending virtual interrupts */ DECLARE_BITMAP(irqs_pending, LGUEST_IRQS); }; @@ -145,8 +145,8 @@ void setup_default_idt_entries(struct lguest_ro_state *state, const unsigned long *def); void copy_traps(const struct lguest *lg, struct desc_struct *idt, const unsigned long *def); -void guest_set_clockevent(struct lguest *lg, unsigned long delta); -void init_clockdev(struct lguest *lg); +void guest_set_clockevent(struct lg_cpu *cpu, unsigned long delta); +void init_clockdev(struct lg_cpu *cpu); bool check_syscall_vector(struct lguest *lg); int init_interrupts(void); void free_interrupts(void); -- cgit v1.2.3