From a7bf30342e6a7924132a5c70047928261d3c7e42 Mon Sep 17 00:00:00 2001 From: Pavel Fedin Date: Thu, 24 Sep 2015 01:29:37 +0100 Subject: hw/intc: Initial implementation of vGICv3 This is the initial version of KVM-accelerated GICv3 support. State load and save are not yet supported, live migration is not possible. In order to get correct class name in a simpler way, gicv3_class_name() function is implemented, similar to gic_class_name(). Signed-off-by: Pavel Fedin Reviewed-by: Peter Maydell Tested-by: Ashok kumar Message-id: 69d8f01d14994d7a1a140e96aef59fd332d02293.1441784344.git.p.fedin@samsung.com Signed-off-by: Peter Maydell --- target-arm/machine.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'target-arm/machine.c') diff --git a/target-arm/machine.c b/target-arm/machine.c index 32adfe792e..36a0d159cc 100644 --- a/target-arm/machine.c +++ b/target-arm/machine.c @@ -1,5 +1,6 @@ #include "hw/hw.h" #include "hw/boards.h" +#include "qemu/error-report.h" #include "sysemu/kvm.h" #include "kvm_arm.h" #include "internals.h" @@ -328,3 +329,20 @@ const VMStateDescription vmstate_arm_cpu = { NULL } }; + +const char *gicv3_class_name(void) +{ + if (kvm_irqchip_in_kernel()) { +#ifdef TARGET_AARCH64 + return "kvm-arm-gicv3"; +#else + error_report("KVM GICv3 acceleration is not supported on this " + "platform\n"); +#endif + } else { + /* TODO: Software emulation is not implemented yet */ + error_report("KVM is currently required for GICv3 emulation\n"); + } + + exit(1); +} -- cgit 1.4.1