linux/tools/testing/selftests/kvm/aarch64
Sean Christopherson 376851f895 KVM: selftests: Stop hardcoding vCPU IDs in vcpu_width_config
In preparation for taking a vCPU pointer in vCPU-scoped functions, grab
the vCPU(s) created by __vm_vcpu_add() and use the ID from the vCPU
object instead of hardcoding the ID in ioctl() invocations.

Rename init1/init2 => init0/init1 to avoid having odd/confusing code
where vcpu0 consumes init1 and vcpu1 consumes init2.

Note, this change could easily be done when the functions are converted
in the future, and/or the vcpu{0,1} vs. init{1,2} discrepancy could be
ignored, but then there would be no opportunity to poke fun at the
1-based counting scheme.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-11 11:47:18 -04:00
..
arch_timer.c KVM: selftests: Convert arch_timer away from VCPU_ID 2022-06-11 11:47:07 -04:00
debug-exceptions.c KVM: selftests: Consolidate KVM_{G,S}ET_ONE_REG helpers 2022-06-11 11:47:10 -04:00
get-reg-list.c KVM: selftests: Convert get-reg-list away from its "VCPU_ID" 2022-06-11 11:47:17 -04:00
hypercalls.c KVM: selftests: Convert hypercalls test away from vm_create_default() 2022-06-11 11:47:11 -04:00
psci_test.c KVM: selftests: Consolidate KVM_{G,S}ET_ONE_REG helpers 2022-06-11 11:47:10 -04:00
vcpu_width_config.c KVM: selftests: Stop hardcoding vCPU IDs in vcpu_width_config 2022-06-11 11:47:18 -04:00
vgic_init.c KVM: selftests: Convert vgic_init away from vm_create_default_with_vcpus() 2022-06-11 11:47:09 -04:00
vgic_irq.c KVM: selftests: Convert vgic_irq away from VCPU_ID 2022-06-11 11:47:01 -04:00