1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * ARM Generic Interrupt Controller (GIC) host specific defines
4  */
5 
6 #ifndef SELFTEST_KVM_VGIC_H
7 #define SELFTEST_KVM_VGIC_H
8 
9 #include <linux/kvm.h>
10 
11 #define REDIST_REGION_ATTR_ADDR(count, base, flags, index) \
12 	(((uint64_t)(count) << 52) | \
13 	((uint64_t)((base) >> 16) << 16) | \
14 	((uint64_t)(flags) << 12) | \
15 	index)
16 
17 int vgic_v3_setup(struct kvm_vm *vm, unsigned int nr_vcpus,
18 		uint64_t gicd_base_gpa, uint64_t gicr_base_gpa);
19 
20 #endif /* SELFTEST_KVM_VGIC_H */
21