Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: selftests: Explicitly state indicies for vm_guest_mode_params array

Explicitly state the indices when populating vm_guest_mode_params to
make it marginally easier to visualize what's going on.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Ben Gardon <bgardon@google.com>
[Added indices for new guest modes.]
Signed-off-by: David Matlack <dmatlack@google.com>
Message-Id: <20211111000310.1435032-2-dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

authored by

Sean Christopherson and committed by
Paolo Bonzini
531ca3d6 7c4de881

+9 -9
+9 -9
tools/testing/selftests/kvm/lib/kvm_util.c
··· 187 187 } 188 188 189 189 const struct vm_guest_mode_params vm_guest_mode_params[] = { 190 - { 52, 48, 0x1000, 12 }, 191 - { 52, 48, 0x10000, 16 }, 192 - { 48, 48, 0x1000, 12 }, 193 - { 48, 48, 0x10000, 16 }, 194 - { 40, 48, 0x1000, 12 }, 195 - { 40, 48, 0x10000, 16 }, 196 - { 0, 0, 0x1000, 12 }, 197 - { 47, 64, 0x1000, 12 }, 198 - { 44, 64, 0x1000, 12 }, 190 + [VM_MODE_P52V48_4K] = { 52, 48, 0x1000, 12 }, 191 + [VM_MODE_P52V48_64K] = { 52, 48, 0x10000, 16 }, 192 + [VM_MODE_P48V48_4K] = { 48, 48, 0x1000, 12 }, 193 + [VM_MODE_P48V48_64K] = { 48, 48, 0x10000, 16 }, 194 + [VM_MODE_P40V48_4K] = { 40, 48, 0x1000, 12 }, 195 + [VM_MODE_P40V48_64K] = { 40, 48, 0x10000, 16 }, 196 + [VM_MODE_PXXV48_4K] = { 0, 0, 0x1000, 12 }, 197 + [VM_MODE_P47V64_4K] = { 47, 64, 0x1000, 12 }, 198 + [VM_MODE_P44V64_4K] = { 44, 64, 0x1000, 12 }, 199 199 }; 200 200 _Static_assert(sizeof(vm_guest_mode_params)/sizeof(struct vm_guest_mode_params) == NUM_VM_MODES, 201 201 "Missing new mode params?");