summaryrefslogtreecommitdiff
path: root/hw/a15mpcore.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2013-03-05 00:34:43 +0000
committerPeter Maydell <peter.maydell@linaro.org>2013-03-05 00:45:28 +0000
commited46676160d94d279e32ce955fd60b76c7a1b370 (patch)
tree4acabb7f0769d5a07de3f0d38fa9fa37f4f384c4 /hw/a15mpcore.c
parenteb035b48d5ff26a155f37106f693acb8b8487d80 (diff)
downloadqemu-ed46676160d94d279e32ce955fd60b76c7a1b370.tar.gz
qemu-ed46676160d94d279e32ce955fd60b76c7a1b370.tar.bz2
qemu-ed46676160d94d279e32ce955fd60b76c7a1b370.zip
hw/kvm/arm_gic: Implement support for KVM in-kernel ARM GIC
Implement support for using the KVM in-kernel GIC for ARM. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/a15mpcore.c')
-rw-r--r--hw/a15mpcore.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/a15mpcore.c b/hw/a15mpcore.c
index fe6c34ca53..97abe413c8 100644
--- a/hw/a15mpcore.c
+++ b/hw/a15mpcore.c
@@ -19,6 +19,7 @@
*/
#include "sysbus.h"
+#include "sysemu/kvm.h"
/* A15MP private memory region. */
@@ -40,8 +41,13 @@ static int a15mp_priv_init(SysBusDevice *dev)
{
A15MPPrivState *s = FROM_SYSBUS(A15MPPrivState, dev);
SysBusDevice *busdev;
+ const char *gictype = "arm_gic";
- s->gic = qdev_create(NULL, "arm_gic");
+ if (kvm_irqchip_in_kernel()) {
+ gictype = "kvm-arm-gic";
+ }
+
+ s->gic = qdev_create(NULL, gictype);
qdev_prop_set_uint32(s->gic, "num-cpu", s->num_cpu);
qdev_prop_set_uint32(s->gic, "num-irq", s->num_irq);
qdev_prop_set_uint32(s->gic, "revision", 2);