diff options
author | Sean Christopherson <seanjc@google.com> | 2022-06-02 13:41:33 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-06-11 11:47:22 -0400 |
commit | 768e9a61856b75de08f5efa5813bb3e7f16ec271 (patch) | |
tree | 013104333c2f15ff33996b92a2b5b5dc6fc1853a /tools/testing/selftests/kvm/x86_64/vmx_dirty_log_test.c | |
parent | KVM: selftests: Require vCPU output array when creating VM with vCPUs (diff) | |
download | linux-dev-768e9a61856b75de08f5efa5813bb3e7f16ec271.tar.xz linux-dev-768e9a61856b75de08f5efa5813bb3e7f16ec271.zip |
KVM: selftests: Purge vm+vcpu_id == vcpu silliness
Take a vCPU directly instead of a VM+vcpu pair in all vCPU-scoped helpers
and ioctls.
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/vmx_dirty_log_test.c')
-rw-r--r-- | tools/testing/selftests/kvm/x86_64/vmx_dirty_log_test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/vmx_dirty_log_test.c b/tools/testing/selftests/kvm/x86_64/vmx_dirty_log_test.c index fb8c7f7236f7..215ffa0589d4 100644 --- a/tools/testing/selftests/kvm/x86_64/vmx_dirty_log_test.c +++ b/tools/testing/selftests/kvm/x86_64/vmx_dirty_log_test.c @@ -82,7 +82,7 @@ int main(int argc, char *argv[]) /* Create VM */ vm = vm_create_with_one_vcpu(&vcpu, l1_guest_code); vmx = vcpu_alloc_vmx(vm, &vmx_pages_gva); - vcpu_args_set(vm, vcpu->id, 1, vmx_pages_gva); + vcpu_args_set(vcpu, 1, vmx_pages_gva); run = vcpu->run; /* Add an extra memory slot for testing dirty logging */ @@ -115,13 +115,13 @@ int main(int argc, char *argv[]) while (!done) { memset(host_test_mem, 0xaa, TEST_MEM_PAGES * 4096); - vcpu_run(vm, vcpu->id); + vcpu_run(vcpu); TEST_ASSERT(run->exit_reason == KVM_EXIT_IO, "Unexpected exit reason: %u (%s),\n", run->exit_reason, exit_reason_str(run->exit_reason)); - switch (get_ucall(vm, vcpu->id, &uc)) { + switch (get_ucall(vcpu, &uc)) { case UCALL_ABORT: TEST_FAIL("%s at %s:%ld", (const char *)uc.args[0], __FILE__, uc.args[1]); |