diff options
author | Pavel Fedin <p.fedin@samsung.com> | 2016-10-04 13:28:08 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-10-04 13:28:08 +0100 |
commit | 386ce3c7fc6bf384eaf78cfbb766c015c26bf9ca (patch) | |
tree | f28c4f5669ada8aa7b366a80c88808075ded61c5 /target-arm/kvm_arm.h | |
parent | d19a4d4ef448e736d341df47bd1adc78c8e40814 (diff) |
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/kvm_arm.h')
-rw-r--r-- | target-arm/kvm_arm.h | 19 |
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 |