aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/kvm/x86_64/sev_migrate_tests.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-02-16 09:56:24 -0800
committerPaolo Bonzini <pbonzini@redhat.com>2022-06-11 11:47:04 -0400
commitf742d94ff4e5147e08b3bb7826f009eda7545124 (patch)
tree98deb5aec5f470863413acd06a0eaeac6d6b3eb3 /tools/testing/selftests/kvm/x86_64/sev_migrate_tests.c
parentKVM: selftests: Return created vcpu from vm_vcpu_add_default() (diff)
downloadlinux-dev-f742d94ff4e5147e08b3bb7826f009eda7545124.tar.xz
linux-dev-f742d94ff4e5147e08b3bb7826f009eda7545124.zip
KVM: selftests: Rename vm_vcpu_add* helpers to better show relationships
Rename vm_vcpu_add() to __vm_vcpu_add(), and vm_vcpu_add_default() to vm_vcpu_add() to show the relationship between the newly minted vm_vcpu_add() and __vm_vcpu_add(). Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/x86_64/sev_migrate_tests.c')
-rw-r--r--tools/testing/selftests/kvm/x86_64/sev_migrate_tests.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/sev_migrate_tests.c b/tools/testing/selftests/kvm/x86_64/sev_migrate_tests.c
index 245fd0755390..ec418b823273 100644
--- a/tools/testing/selftests/kvm/x86_64/sev_migrate_tests.c
+++ b/tools/testing/selftests/kvm/x86_64/sev_migrate_tests.c
@@ -56,7 +56,7 @@ static struct kvm_vm *sev_vm_create(bool es)
vm = vm_create_barebones();
sev_ioctl(vm->fd, es ? KVM_SEV_ES_INIT : KVM_SEV_INIT, NULL);
for (i = 0; i < NR_MIGRATE_TEST_VCPUS; ++i)
- vm_vcpu_add(vm, i);
+ __vm_vcpu_add(vm, i);
if (es)
start.policy |= SEV_POLICY_ES;
sev_ioctl(vm->fd, KVM_SEV_LAUNCH_START, &start);
@@ -75,7 +75,7 @@ static struct kvm_vm *aux_vm_create(bool with_vcpus)
return vm;
for (i = 0; i < NR_MIGRATE_TEST_VCPUS; ++i)
- vm_vcpu_add(vm, i);
+ __vm_vcpu_add(vm, i);
return vm;
}
@@ -182,7 +182,7 @@ static void test_sev_migrate_parameters(void)
sev_es_vm = sev_vm_create(/* es= */ true);
sev_es_vm_no_vmsa = vm_create_barebones();
sev_ioctl(sev_es_vm_no_vmsa->fd, KVM_SEV_ES_INIT, NULL);
- vm_vcpu_add(sev_es_vm_no_vmsa, 1);
+ __vm_vcpu_add(sev_es_vm_no_vmsa, 1);
ret = __sev_migrate_from(sev_vm, sev_es_vm);
TEST_ASSERT(
@@ -278,7 +278,7 @@ static void test_sev_mirror(bool es)
/* Check that we can complete creation of the mirror VM. */
for (i = 0; i < NR_MIGRATE_TEST_VCPUS; ++i)
- vm_vcpu_add(dst_vm, i);
+ __vm_vcpu_add(dst_vm, i);
if (es)
sev_ioctl(dst_vm->fd, KVM_SEV_LAUNCH_UPDATE_VMSA, NULL);