mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
KVM: arm64: selftests: Add basic GICv3 support
Add basic support for ARM Generic Interrupt Controller v3. The support provides guests to setup interrupts. The work is inspired from kvm-unit-tests and the kernel's GIC driver (drivers/irqchip/irq-gic-v3.c). Signed-off-by: Raghavendra Rao Ananta <rananta@google.com> Reviewed-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Ricardo Koller <ricarkol@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20211007233439.1826892-13-rananta@google.com
This commit is contained in:
committed by
Marc Zyngier
parent
414de89df1
commit
28281652f9
21
tools/testing/selftests/kvm/include/aarch64/gic.h
Normal file
21
tools/testing/selftests/kvm/include/aarch64/gic.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* ARM Generic Interrupt Controller (GIC) specific defines
|
||||
*/
|
||||
|
||||
#ifndef SELFTEST_KVM_GIC_H
|
||||
#define SELFTEST_KVM_GIC_H
|
||||
|
||||
enum gic_type {
|
||||
GIC_V3,
|
||||
GIC_TYPE_MAX,
|
||||
};
|
||||
|
||||
void gic_init(enum gic_type type, unsigned int nr_cpus,
|
||||
void *dist_base, void *redist_base);
|
||||
void gic_irq_enable(unsigned int intid);
|
||||
void gic_irq_disable(unsigned int intid);
|
||||
unsigned int gic_get_and_ack_irq(void);
|
||||
void gic_set_eoi(unsigned int intid);
|
||||
|
||||
#endif /* SELFTEST_KVM_GIC_H */
|
||||
Reference in New Issue
Block a user