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>
This commit is contained in:
Sean Christopherson 2022-02-16 11:47:05 -08:00 коммит произвёл Paolo Bonzini
Родитель 1ca378f653
Коммит ff624e57d8
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -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);