aboutsummaryrefslogtreecommitdiff
path: root/target-arm
diff options
context:
space:
mode:
authorPavel Fedin <p.fedin@samsung.com>2016-10-04 13:28:08 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-10-04 13:28:08 +0100
commit386ce3c7fc6bf384eaf78cfbb766c015c26bf9ca (patch)
treef28c4f5669ada8aa7b366a80c88808075ded61c5 /target-arm
parentd19a4d4ef448e736d341df47bd1adc78c8e40814 (diff)
downloadqemu-386ce3c7fc6bf384eaf78cfbb766c015c26bf9ca.zip
qemu-386ce3c7fc6bf384eaf78cfbb766c015c26bf9ca.tar.gz
qemu-386ce3c7fc6bf384eaf78cfbb766c015c26bf9ca.tar.bz2
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 a419368..544e404 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