KVM: riscv: selftests: Selectively filter-out AIA registers
authorAnup Patel <apatel@ventanamicro.com>
Mon, 18 Sep 2023 05:25:55 +0000 (10:55 +0530)
committerAnup Patel <anup@brainfault.org>
Thu, 21 Sep 2023 09:34:05 +0000 (15:04 +0530)
commit071ef070ca77e6dfe33fd78afa293e83422f0411
tree8dbdfd4b7a7a9552d35a9f5a14f9f622b6c8a543
parentba1af6e2e0f0e814c0f6be6ef64917c212f9fa96
KVM: riscv: selftests: Selectively filter-out AIA registers

Currently the AIA ONE_REG registers are reported by get-reg-list
as new registers for various vcpu_reg_list configs whenever Ssaia
is available on the host because Ssaia extension can only be
disabled by Smstateen extension which is not always available.

To tackle this, we should filter-out AIA ONE_REG registers only
when Ssaia can't be disabled for a VCPU.

Fixes: 477069398ed6 ("KVM: riscv: selftests: Add get-reg-list test")
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
tools/testing/selftests/kvm/riscv/get-reg-list.c