diff options
author | Sean Christopherson <seanjc@google.com> | 2022-02-16 11:47:05 -0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-06-11 10:14:40 -0400 |
commit | ff624e57d8dfb6c66ff8118aca7bad61d75428f0 (patch) | |
tree | 90566b13abb2092816906c415af86e914c61d374 | |
parent | 1ca378f65378864b33a0356478252bd49bf6ef86 (diff) | |
download | linux-ff624e57d8dfb6c66ff8118aca7bad61d75428f0.tar.bz2 |
KVM: selftests: Fix typo in vgic_init test
When iterating over vCPUs, invoke access_v3_redist_reg() on the "current"
vCPU instead of vCPU0, which is presumably what was intended by iterating
over all vCPUs.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | tools/testing/selftests/kvm/aarch64/vgic_init.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/testing/selftests/kvm/aarch64/vgic_init.c b/tools/testing/selftests/kvm/aarch64/vgic_init.c index 0f046e3e953d..defd196c69d2 100644 --- a/tools/testing/selftests/kvm/aarch64/vgic_init.c +++ b/tools/testing/selftests/kvm/aarch64/vgic_init.c @@ -426,8 +426,9 @@ static void test_v3_typer_accesses(void) KVM_DEV_ARM_VGIC_CTRL_INIT, NULL, true); for (i = 0; i < NR_VCPUS ; i++) { - ret = access_v3_redist_reg(v.gic_fd, 0, GICR_TYPER, &val, false); - TEST_ASSERT(!ret && !val, "read GICR_TYPER before rdist region setting"); + ret = access_v3_redist_reg(v.gic_fd, i, GICR_TYPER, &val, false); + TEST_ASSERT(!ret && val == i * 0x100, + "read GICR_TYPER before rdist region setting"); } addr = REDIST_REGION_ATTR_ADDR(2, 0x200000, 0, 0); |