From 60a79016aed70c4ebcd45a8006c46dc9c397685a Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Thu, 25 Sep 2014 22:21:31 -0700 Subject: qtest/irq: Rework IRQ interception Change the qtest intercept handler to accept just the individual IRQ being intercepted as opaque. n is still expected to be correctly set as for the original intercepted irq. qemu_intercept_irq_in is updated accordingly. Then covert the qemu_irq_intercept_out call to use qdev intercept version. This stops qtest from having to mess with the raw IRQ pointers (still has to mess with names and counts but a step in the right direction). Reviewed-by: Alexander Graf Signed-off-by: Peter Crosthwaite Signed-off-by: Paolo Bonzini --- hw/core/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/core/irq.c') diff --git a/hw/core/irq.c b/hw/core/irq.c index cffced040f..4a580a22f3 100644 --- a/hw/core/irq.c +++ b/hw/core/irq.c @@ -140,7 +140,7 @@ void qemu_irq_intercept_in(qemu_irq *gpio_in, qemu_irq_handler handler, int n) for (i = 0; i < n; i++) { *old_irqs[i] = *gpio_in[i]; gpio_in[i]->handler = handler; - gpio_in[i]->opaque = old_irqs; + gpio_in[i]->opaque = &old_irqs[i]; } } -- cgit v1.2.1