[PATCH 4/4] KVM: arm64: selftest: vgic-v3: Add basic GICv3 sysreg userspace access test

Itaru Kitayama itaru.kitayama at linux.dev
Wed Jul 23 01:46:14 PDT 2025



> On Jul 23, 2025, at 17:15, Marc Zyngier <maz at kernel.org> wrote:
> 
> On Wed, 23 Jul 2025 06:00:40 +0100,
> Itaru Kitayama <itaru.kitayama at linux.dev> wrote:
>> 
>> On Fri, Jul 18, 2025 at 12:11:54PM +0100, Marc Zyngier wrote:
>>> We have a lot of more or less useful vgic tests, but none of them
>>> tracks the availability of GICv3 system registers, which is a bit
>>> annoying.
>>> 
>>> Add one such test, which covers both EL1 and EL2 registers.
>>> 
>>> Signed-off-by: Marc Zyngier <maz at kernel.org>
>> 
>> I've tested this selftest on the RevC FVP with kvm-arm.mode=nested.
>> 
>> Tested-by: Itaru Kitayama <itaru.kitayama at fujitsu.com>
>> 
>> Running GIC_v3 tests.
>> __vm_create: mode='PA-bits:40,  VA-bits:48,  4K pages' type='0', pages='672'
>> __vm_create: mode='PA-bits:40,  VA-bits:48,  4K pages' type='0', pages='657'
>> __vm_create: mode='PA-bits:40,  VA-bits:48,  4K pages' type='0', pages='672'
>> __vm_create: mode='PA-bits:40,  VA-bits:48,  4K pages' type='0', pages='672'
>> __vm_create: mode='PA-bits:40,  VA-bits:48,  4K pages' type='0', pages='672'
>> __vm_create: mode='PA-bits:40,  VA-bits:48,  4K pages' type='0', pages='672'
>> __vm_create: mode='PA-bits:40,  VA-bits:48,  4K pages' type='0', pages='682'
>> __vm_create: mode='PA-bits:40,  VA-bits:48,  4K pages' type='0', pages='682'
>> __vm_create: mode='PA-bits:40,  VA-bits:48,  4K pages' type='0', pages='657'
>> __vm_create: mode='PA-bits:40,  VA-bits:48,  4K pages' type='0', pages='672'
>> __vm_create: mode='PA-bits:40,  VA-bits:48,  4K pages' type='0', pages='657'
> 
> I have no idea what you tested it on, because I get none of this
> nonsense.
> 
> Where is it coming from?

From lib/kvm_util.c file __vm_create()’s pr_debug().

Anyway, I rebuilt the kernel your recent two patch sets on top of kvm-next/next and did the test. 

# ./arm64/vgic_init
Random seed: 0x6b8b4567
Running GIC_v3 tests.
SKIP SYS_ICC_AP0R1_EL1 for read
SKIP SYS_ICC_AP0R1_EL1 for write
SKIP SYS_ICC_AP0R2_EL1 for read
SKIP SYS_ICC_AP0R2_EL1 for write
SKIP SYS_ICC_AP0R3_EL1 for read
SKIP SYS_ICC_AP0R3_EL1 for write
SKIP SYS_ICC_AP1R1_EL1 for read
SKIP SYS_ICC_AP1R1_EL1 for write
SKIP SYS_ICC_AP1R2_EL1 for read
SKIP SYS_ICC_AP1R2_EL1 for write
SKIP SYS_ICC_AP1R3_EL1 for read
SKIP SYS_ICC_AP1R3_EL1 for write
SKIP SYS_ICH_AP0R1_EL2 for read
SKIP SYS_ICH_AP0R1_EL2 for write
SKIP SYS_ICH_AP0R2_EL2 for read
SKIP SYS_ICH_AP0R2_EL2 for write
SKIP SYS_ICH_AP0R3_EL2 for read
SKIP SYS_ICH_AP0R3_EL2 for write
SKIP SYS_ICH_AP1R1_EL2 for read
SKIP SYS_ICH_AP1R1_EL2 for write
SKIP SYS_ICH_AP1R2_EL2 for read
SKIP SYS_ICH_AP1R2_EL2 for write
SKIP SYS_ICH_AP1R3_EL2 for read
SKIP SYS_ICH_AP1R3_EL2 for write

Thanks,
Itaru.

> M.
> 
> -- 
> Jazz isn't dead. It just smells funny.





More information about the linux-arm-kernel mailing list