aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest/lguest_user.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-06-13 00:27:08 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-06-12 08:57:09 -0400
commit9f155a9b3d5a5444bcc5e049ec2547bb5107150e (patch)
treeef8fe2d5a319abb3bb1c89374f9d2fef1b0881c3 /drivers/lguest/lguest_user.c
parent92b4d8df8436cdd74d22a2a5b6b23b9abc737a3e (diff)
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 bcdcf3453e78..1982b45bd935 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)
45 return -EFAULT; 45 return -EFAULT;
46 if (irq >= LGUEST_IRQS) 46 if (irq >= LGUEST_IRQS)
47 return -EINVAL; 47 return -EINVAL;
48 /* Next time the Guest runs, the core code will see if it can deliver 48
49 * this interrupt. */ 49 set_interrupt(cpu, irq);
50 set_bit(irq, cpu->irqs_pending);
51 return 0; 50 return 0;
52} 51}
53 52
@@ -252,11 +251,6 @@ static ssize_t write(struct file *file, const char __user *in,
252 /* Once the Guest is dead, you can only read() why it died. */ 251 /* Once the Guest is dead, you can only read() why it died. */
253 if (lg->dead) 252 if (lg->dead)
254 return -ENOENT; 253 return -ENOENT;
255
256 /* If you're not the task which owns the Guest, all you can do
257 * is break the Launcher out of running the Guest. */
258 if (current != cpu->tsk && req != LHREQ_BREAK)
259 return -EPERM;
260 } 254 }
261 255
262 switch (req) { 256 switch (req) {