diff options
author | Ricardo Koller <ricarkol@google.com> | 2021-11-09 05:39:03 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-12-28 22:24:48 +0300 |
commit | 88209c104e9b3e95502c0e924fb1cd8bd5a01d82 (patch) | |
tree | 3137f95ce0f2f59f0e9767f89a19f4665af88f52 /tools/testing/selftests/kvm/include/kvm_util.h | |
parent | 90f50acac9ee9f81192098c22b2cbf2491a40263 (diff) | |
download | linux-88209c104e9b3e95502c0e924fb1cd8bd5a01d82.tar.xz |
KVM: selftests: Add IRQ GSI routing library functions
Add an architecture independent wrapper function for creating and
writing IRQ GSI routing tables. Also add a function to add irqchip
entries.
Signed-off-by: Ricardo Koller <ricarkol@google.com>
Acked-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211109023906.1091208-15-ricarkol@google.com
Diffstat (limited to 'tools/testing/selftests/kvm/include/kvm_util.h')
-rw-r--r-- | tools/testing/selftests/kvm/include/kvm_util.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/include/kvm_util.h b/tools/testing/selftests/kvm/include/kvm_util.h index 4ba8fd44cf95..db36e6c49983 100644 --- a/tools/testing/selftests/kvm/include/kvm_util.h +++ b/tools/testing/selftests/kvm/include/kvm_util.h @@ -252,6 +252,14 @@ int _vcpu_access_device_attr(struct kvm_vm *vm, uint32_t vcpuid, uint32_t group, int vcpu_access_device_attr(struct kvm_vm *vm, uint32_t vcpuid, uint32_t group, uint64_t attr, void *val, bool write); +#define KVM_MAX_IRQ_ROUTES 4096 + +struct kvm_irq_routing *kvm_gsi_routing_create(void); +void kvm_gsi_routing_irqchip_add(struct kvm_irq_routing *routing, + uint32_t gsi, uint32_t pin); +int _kvm_gsi_routing_write(struct kvm_vm *vm, struct kvm_irq_routing *routing); +void kvm_gsi_routing_write(struct kvm_vm *vm, struct kvm_irq_routing *routing); + const char *exit_reason_str(unsigned int exit_reason); void virt_pgd_alloc(struct kvm_vm *vm); |