On 24/01/2013 16:43, Peter Maydell wrote:
Implement support for using the KVM in-kernel GIC for ARM.

Signed-off-by: Peter Maydell <peter.mayd...@linaro.org>
---
  hw/a15mpcore.c       |    8 ++-
  hw/arm/Makefile.objs |    1 +
  hw/kvm/arm_gic.c     |  169 ++++++++++++++++++++++++++++++++++++++++++++++++++
  3 files changed, 177 insertions(+), 1 deletion(-)
  create mode 100644 hw/kvm/arm_gic.c

diff --git a/hw/a15mpcore.c b/hw/a15mpcore.c
index fe6c34c..1ca6f28 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/arm-gic/arm_gic/                 ^^ ?

Christoffer and I had trouble with that:

qemu-system-arm: Unknown device 'arm-gic' for default sysbus

Fred
- 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);

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to