summaryrefslogtreecommitdiffstats
path: root/target-arm
diff options
context:
space:
mode:
authorPavel Fedin2016-10-04 14:28:08 +0200
committerPeter Maydell2016-10-04 14:28:08 +0200
commit386ce3c7fc6bf384eaf78cfbb766c015c26bf9ca (patch)
treef28c4f5669ada8aa7b366a80c88808075ded61c5 /target-arm
parenthw/intc/arm_gic(v3)_kvm: Initialize gsi routing (diff)
downloadqemu-386ce3c7fc6bf384eaf78cfbb766c015c26bf9ca.tar.gz
qemu-386ce3c7fc6bf384eaf78cfbb766c015c26bf9ca.tar.xz
qemu-386ce3c7fc6bf384eaf78cfbb766c015c26bf9ca.zip
hw/intc/arm_gicv3_its: Implement ITS base class
This is the basic skeleton for both KVM and software-emulated ITS. Since we already prepare status structure, we also introduce complete VMState description. But, because we currently have no migratable implementations, we also set unmigratable flag. Signed-off-by: Pavel Fedin <p.fedin@samsung.com> Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1474616617-366-3-git-send-email-eric.auger@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm')
-rw-r--r--target-arm/kvm_arm.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/target-arm/kvm_arm.h b/target-arm/kvm_arm.h
index a4193684a8..544e404aa5 100644
--- a/target-arm/kvm_arm.h
+++ b/target-arm/kvm_arm.h
@@ -255,4 +255,23 @@ struct kvm_guest_debug_arch;
void kvm_arm_copy_hw_debug_data(struct kvm_guest_debug_arch *ptr);
+/**
+ * its_class_name
+ *
+ * Return the ITS class name to use depending on whether KVM acceleration
+ * and KVM CAP_SIGNAL_MSI are supported
+ *
+ * Returns: class name to use or NULL
+ */
+static inline const char *its_class_name(void)
+{
+ if (kvm_irqchip_in_kernel()) {
+ /* KVM implementation requires this capability */
+ return kvm_direct_msi_enabled() ? "arm-its-kvm" : NULL;
+ } else {
+ /* Software emulation is not implemented yet */
+ return NULL;
+ }
+}
+
#endif