aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest/lguest_user.c
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-01-07 08:05:29 -0500
committerRusty Russell <rusty@rustcorp.com.au>2008-01-30 06:50:09 -0500
commit177e449dc5bd4cf8dc48d66abee61ddf34b126b9 (patch)
treef0aaea9407971d8f6b9ad4e177a834f1be3aa993 /drivers/lguest/lguest_user.c
parentad8d8f3bc61ec712dd141e1029ae68c47fadc4a7 (diff)
lguest: per-vcpu interrupt processing.
This patch adapts interrupt processing for using the vcpu struct. Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/lguest_user.c')
-rw-r--r--drivers/lguest/lguest_user.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c
index f231b9be0b64..605db5c49e7f 100644
--- a/drivers/lguest/lguest_user.c
+++ b/drivers/lguest/lguest_user.c
@@ -36,7 +36,7 @@ static int break_guest_out(struct lguest *lg, const unsigned long __user *input)
36 36
37/*L:050 Sending an interrupt is done by writing LHREQ_IRQ and an interrupt 37/*L:050 Sending an interrupt is done by writing LHREQ_IRQ and an interrupt
38 * number to /dev/lguest. */ 38 * number to /dev/lguest. */
39static int user_send_irq(struct lguest *lg, const unsigned long __user *input) 39static int user_send_irq(struct lg_cpu *cpu, const unsigned long __user *input)
40{ 40{
41 unsigned long irq; 41 unsigned long irq;
42 42
@@ -46,7 +46,7 @@ static int user_send_irq(struct lguest *lg, const unsigned long __user *input)
46 return -EINVAL; 46 return -EINVAL;
47 /* Next time the Guest runs, the core code will see if it can deliver 47 /* Next time the Guest runs, the core code will see if it can deliver
48 * this interrupt. */ 48 * this interrupt. */
49 set_bit(irq, lg->irqs_pending); 49 set_bit(irq, cpu->irqs_pending);
50 return 0; 50 return 0;
51} 51}
52 52
@@ -225,7 +225,7 @@ static ssize_t write(struct file *file, const char __user *in,
225 struct lguest *lg = file->private_data; 225 struct lguest *lg = file->private_data;
226 const unsigned long __user *input = (const unsigned long __user *)in; 226 const unsigned long __user *input = (const unsigned long __user *)in;
227 unsigned long req; 227 unsigned long req;
228 struct lg_cpu *cpu; 228 struct lg_cpu *uninitialized_var(cpu);
229 unsigned int cpu_id = *off; 229 unsigned int cpu_id = *off;
230 230
231 if (get_user(req, input) != 0) 231 if (get_user(req, input) != 0)
@@ -253,7 +253,7 @@ static ssize_t write(struct file *file, const char __user *in,
253 case LHREQ_INITIALIZE: 253 case LHREQ_INITIALIZE:
254 return initialize(file, input); 254 return initialize(file, input);
255 case LHREQ_IRQ: 255 case LHREQ_IRQ:
256 return user_send_irq(lg, input); 256 return user_send_irq(cpu, input);
257 case LHREQ_BREAK: 257 case LHREQ_BREAK:
258 return break_guest_out(lg, input); 258 return break_guest_out(lg, input);
259 default: 259 default: