Skip to content

Commit d82689b

Browse files
ouptonMarc Zyngier
authored andcommitted
KVM: selftests: Align with kernel's GIC definitions
There are a few subtle incongruencies between the GIC definitions used by the kernel and selftests. Furthermore, the selftests header blends implementation detail (e.g. default priority) with the architectural definitions. This is all rather annoying, since bulk imports of the kernel header is not possible. Move selftests-specific definitions out of the offending header and realign tests on the canonical definitions for things like sysregs. Finally, haul in a fresh copy of the gicv3 header to enable a forthcoming ITS selftest. Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20240422200158.2606761-14-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 481c9ee commit d82689b

3 files changed

Lines changed: 568 additions & 35 deletions

File tree

tools/testing/selftests/kvm/aarch64/vgic_irq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,15 @@ static void reset_stats(void)
152152

153153
static uint64_t gic_read_ap1r0(void)
154154
{
155-
uint64_t reg = read_sysreg_s(SYS_ICV_AP1R0_EL1);
155+
uint64_t reg = read_sysreg_s(SYS_ICC_AP1R0_EL1);
156156

157157
dsb(sy);
158158
return reg;
159159
}
160160

161161
static void gic_write_ap1r0(uint64_t val)
162162
{
163-
write_sysreg_s(val, SYS_ICV_AP1R0_EL1);
163+
write_sysreg_s(val, SYS_ICC_AP1R0_EL1);
164164
isb();
165165
}
166166

0 commit comments

Comments
 (0)