aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest/lguest_user.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-06-12 22:27:08 -0600
committerRusty Russell <rusty@rustcorp.com.au>2009-06-12 22:27:09 +0930
commit9f155a9b3d5a5444bcc5e049ec2547bb5107150e (patch)
treeef8fe2d5a319abb3bb1c89374f9d2fef1b0881c3 /drivers/lguest/lguest_user.c
parent92b4d8df8436cdd74d22a2a5b6b23b9abc737a3e (diff)
downloadkernel_goldelico_gta04-9f155a9b3d5a5444bcc5e049ec2547bb5107150e.zip
kernel_goldelico_gta04-9f155a9b3d5a5444bcc5e049ec2547bb5107150e.tar.gz
kernel_goldelico_gta04-9f155a9b3d5a5444bcc5e049ec2547bb5107150e.tar.bz2
lguest: allow any process to send interrupts
We currently only allow the Launcher process to send interrupts, but it as we already send interrupts from the hrtimer, it's a simple matter of extracting that code into a common set_interrupt routine. As we switch to a thread per virtqueue, this avoids a bottleneck through the main Launcher process. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/lguest_user.c')
-rw-r--r--drivers/lguest/lguest_user.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c
index bcdcf34..1982b45 100644
--- a/drivers/lguest/lguest_user.c
+++ b/drivers/lguest/lguest_user.c
@@ -45,9 +45,8 @@ static int user_send_irq(struct lg_cpu *cpu, const unsigned long __user *input)
return -EFAULT;
if (irq >= LGUEST_IRQS)
return -EINVAL;
- /* Next time the Guest runs, the core code will see if it can deliver
- * this interrupt. */
- set_bit(irq, cpu->irqs_pending);
+
+ set_interrupt(cpu, irq);
return 0;
}
@@ -252,11 +251,6 @@ static ssize_t write(struct file *file, const char __user *in,
/* Once the Guest is dead, you can only read() why it died. */
if (lg->dead)
return -ENOENT;
-
- /* If you're not the task which owns the Guest, all you can do
- * is break the Launcher out of running the Guest. */
- if (current != cpu->tsk && req != LHREQ_BREAK)
- return -EPERM;
}
switch (req) {