From 66686c2ab08feb721ca4d98285fba64acdf6017f Mon Sep 17 00:00:00 2001 From: Glauber de Oliveira Costa Date: Mon, 7 Jan 2008 11:05:34 -0200 Subject: lguest: per-vcpu lguest task management lguest uses tasks to control its running behaviour (like sending breaks, controlling halted state, etc). In a per-vcpu environment, each vcpu will have its own underlying task. So this patch makes the infrastructure for that possible Signed-off-by: Glauber de Oliveira Costa Signed-off-by: Rusty Russell --- drivers/lguest/lg.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'drivers/lguest/lg.h') diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h index d08b85342b92..e7123fa6127f 100644 --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h @@ -43,6 +43,8 @@ struct lguest; struct lg_cpu { unsigned int id; struct lguest *lg; + struct task_struct *tsk; + struct mm_struct *mm; /* == tsk->mm, but that becomes NULL on exit */ /* At end of a page shared mapped over lguest_pages in guest. */ unsigned long regs_page; @@ -55,6 +57,11 @@ struct lg_cpu { /* Virtual clock device */ struct hrtimer hrt; + /* Do we need to stop what we're doing and return to userspace? */ + int break_out; + wait_queue_head_t break_wq; + int halted; + /* Pending virtual interrupts */ DECLARE_BITMAP(irqs_pending, LGUEST_IRQS); @@ -65,8 +72,6 @@ struct lg_cpu { struct lguest { struct lguest_data __user *lguest_data; - struct task_struct *tsk; - struct mm_struct *mm; /* == tsk->mm, but that becomes NULL on exit */ struct lg_cpu cpus[NR_CPUS]; unsigned int nr_cpus; @@ -76,15 +81,10 @@ struct lguest void __user *mem_base; unsigned long kernel_address; u32 cr2; - int halted; int ts; u32 esp1; u8 ss1; - /* Do we need to stop what we're doing and return to userspace? */ - int break_out; - wait_queue_head_t break_wq; - /* Bitmap of what has changed: see CHANGED_* above. */ int changed; struct lguest_pages *last_pages; -- cgit v1.2.3