aboutsummaryrefslogtreecommitdiff
path: root/hw/a15mpcore.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2013-03-05 15:11:30 +0100
committerAurelien Jarno <aurelien@aurel32.net>2013-03-05 15:11:30 +0100
commit76c48503c4c87afabf0c93acf78480f65276844d (patch)
tree5da0770ccc0027de96f5671db62db5ac065a15b1 /hw/a15mpcore.c
parent597e2cec8096e0703506abcbbf66938b5ac04368 (diff)
parented4659d10fa2ec16ace367e4fffe6f7ced73112c (diff)
Merge branch 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm
* 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm: MAINTAINERS: add entry for ARM KVM guest cores configure: Enable KVM on ARM hw/kvm/arm_gic: Implement support for KVM in-kernel ARM GIC target-arm: Use MemoryListener to identify GIC base address for KVM hw/arm_gic: Convert ARM GIC classes to use init/realize hw/arm_gic: Add presave/postload hooks ARM KVM: save and load VFP registers from kernel ARM: KVM: Add support for KVM on ARM architecture target-arm: Drop CPUARMState* argument from bank_number() linux-headers: resync from mainline to add ARM KVM headers oslib-posix: Align to permit transparent hugepages on ARM Linux target-arm: Don't decode RFE or SRS on M profile cores target-arm: Factor out handling of SRS instruction
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);