From 177e449dc5bd4cf8dc48d66abee61ddf34b126b9 Mon Sep 17 00:00:00 2001 From: Glauber de Oliveira Costa Date: Mon, 7 Jan 2008 11:05:29 -0200 Subject: lguest: per-vcpu interrupt processing. This patch adapts interrupt processing for using the vcpu struct. Signed-off-by: Glauber de Oliveira Costa Signed-off-by: Rusty Russell --- drivers/lguest/lguest_user.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/lguest/lguest_user.c') diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c index f231b9be0b6..605db5c49e7 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) /*L:050 Sending an interrupt is done by writing LHREQ_IRQ and an interrupt * number to /dev/lguest. */ -static int user_send_irq(struct lguest *lg, const unsigned long __user *input) +static int user_send_irq(struct lg_cpu *cpu, const unsigned long __user *input) { unsigned long irq; @@ -46,7 +46,7 @@ static int user_send_irq(struct lguest *lg, const unsigned long __user *input) return -EINVAL; /* Next time the Guest runs, the core code will see if it can deliver * this interrupt. */ - set_bit(irq, lg->irqs_pending); + set_bit(irq, cpu->irqs_pending); return 0; } @@ -225,7 +225,7 @@ static ssize_t write(struct file *file, const char __user *in, struct lguest *lg = file->private_data; const unsigned long __user *input = (const unsigned long __user *)in; unsigned long req; - struct lg_cpu *cpu; + struct lg_cpu *uninitialized_var(cpu); unsigned int cpu_id = *off; if (get_user(req, input) != 0) @@ -253,7 +253,7 @@ static ssize_t write(struct file *file, const char __user *in, case LHREQ_INITIALIZE: return initialize(file, input); case LHREQ_IRQ: - return user_send_irq(lg, input); + return user_send_irq(cpu, input); case LHREQ_BREAK: return break_guest_out(lg, input); default: -- cgit v1.2.3