From: Vishal Annapurve <vannapurve@google.com>
To: x86@kernel.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Cc: pbonzini@redhat.com, shuah@kernel.org, bgardon@google.com,
seanjc@google.com, oupton@google.com, peterx@redhat.com,
vkuznets@redhat.com, drjones@redhat.com, dmatlack@google.com,
Vishal Annapurve <vannapurve@google.com>
Subject: [V1 PATCH 4/5] selftests: kvm: delete svm_vmcall_test
Date: Sat, 3 Sep 2022 01:28:48 +0000 [thread overview]
Message-ID: <20220903012849.938069-5-vannapurve@google.com> (raw)
In-Reply-To: <20220903012849.938069-1-vannapurve@google.com>
svm_vmcall_test is superseded by fix_hypercall_test.
Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Vishal Annapurve <vannapurve@google.com>
---
tools/testing/selftests/kvm/.gitignore | 1 -
.../selftests/kvm/x86_64/svm_vmcall_test.c | 73 -------------------
2 files changed, 74 deletions(-)
delete mode 100644 tools/testing/selftests/kvm/x86_64/svm_vmcall_test.c
diff --git a/tools/testing/selftests/kvm/.gitignore b/tools/testing/selftests/kvm/.gitignore
index d625a3f83780..22e9a5b5488c 100644
--- a/tools/testing/selftests/kvm/.gitignore
+++ b/tools/testing/selftests/kvm/.gitignore
@@ -36,7 +36,6 @@
/x86_64/sev_migrate_tests
/x86_64/smm_test
/x86_64/state_test
-/x86_64/svm_vmcall_test
/x86_64/svm_int_ctl_test
/x86_64/svm_nested_soft_inject_test
/x86_64/sync_regs_test
diff --git a/tools/testing/selftests/kvm/x86_64/svm_vmcall_test.c b/tools/testing/selftests/kvm/x86_64/svm_vmcall_test.c
deleted file mode 100644
index 95ddc2bff332..000000000000
--- a/tools/testing/selftests/kvm/x86_64/svm_vmcall_test.c
+++ /dev/null
@@ -1,73 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * svm_vmcall_test
- *
- * Copyright (C) 2020, Red Hat, Inc.
- *
- * Nested SVM testing: VMCALL
- */
-
-#include "test_util.h"
-#include "kvm_util.h"
-#include "processor.h"
-#include "svm_util.h"
-
-static void l2_guest_code(struct svm_test_data *svm)
-{
- __asm__ __volatile__("vmcall");
-}
-
-static void l1_guest_code(struct svm_test_data *svm)
-{
- #define L2_GUEST_STACK_SIZE 64
- unsigned long l2_guest_stack[L2_GUEST_STACK_SIZE];
- struct vmcb *vmcb = svm->vmcb;
-
- /* Prepare for L2 execution. */
- generic_svm_setup(svm, l2_guest_code,
- &l2_guest_stack[L2_GUEST_STACK_SIZE]);
-
- run_guest(vmcb, svm->vmcb_gpa);
-
- GUEST_ASSERT(vmcb->control.exit_code == SVM_EXIT_VMMCALL);
- GUEST_DONE();
-}
-
-void __main(int argc, char *argv[])
-{
- struct kvm_vcpu *vcpu;
- vm_vaddr_t svm_gva;
- struct kvm_vm *vm;
-
- TEST_REQUIRE(kvm_cpu_has(X86_FEATURE_SVM));
-
- vm = vm_create_with_one_vcpu(&vcpu, l1_guest_code);
-
- vcpu_alloc_svm(vm, &svm_gva);
- vcpu_args_set(vcpu, 1, svm_gva);
-
- for (;;) {
- volatile struct kvm_run *run = vcpu->run;
- struct ucall uc;
-
- vcpu_run(vcpu);
- TEST_ASSERT(run->exit_reason == KVM_EXIT_IO,
- "Got exit_reason other than KVM_EXIT_IO: %u (%s)\n",
- run->exit_reason,
- exit_reason_str(run->exit_reason));
-
- switch (get_ucall(vcpu, &uc)) {
- case UCALL_ABORT:
- REPORT_GUEST_ASSERT(uc);
- /* NOT REACHED */
- case UCALL_SYNC:
- break;
- case UCALL_DONE:
- goto done;
- default:
- TEST_FAIL("Unknown ucall 0x%lx.", uc.cmd);
- }
- }
-done:
- kvm_vm_free(vm);
-}
--
2.37.2.789.g6183377224-goog
next prev parent reply other threads:[~2022-09-03 1:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-03 1:28 [V1 PATCH 0/5] Execute hypercalls from guests according to cpu type Vishal Annapurve
2022-09-03 1:28 ` [V1 PATCH 1/5] selftests: kvm: move common startup logic to kvm_util.c Vishal Annapurve
2022-09-08 21:09 ` David Matlack
2022-09-14 19:09 ` Vishal Annapurve
2022-09-03 1:28 ` [V1 PATCH 2/5] selftests: kvm: Introduce kvm_arch_main and helpers Vishal Annapurve
2022-09-05 7:46 ` Andrew Jones
2022-09-06 22:46 ` Vishal Annapurve
2022-09-08 21:21 ` David Matlack
2022-09-09 7:01 ` Andrew Jones
2022-09-14 19:13 ` Vishal Annapurve
2022-09-08 21:27 ` David Matlack
2022-09-03 1:28 ` [V1 PATCH 3/5] selftests: kvm: x86: Execute vmcall/vmmcall according to CPU type Vishal Annapurve
2022-09-08 22:54 ` David Matlack
2022-09-08 22:57 ` David Matlack
2022-09-14 19:12 ` Vishal Annapurve
2022-09-03 1:28 ` Vishal Annapurve [this message]
2022-09-03 1:28 ` [V1 PATCH 5/5] selftests: kvm: Execute vmcall/vmmcall as per cpu type Vishal Annapurve
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220903012849.938069-5-vannapurve@google.com \
--to=vannapurve@google.com \
--cc=bgardon@google.com \
--cc=dmatlack@google.com \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=oupton@google.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=seanjc@google.com \
--cc=shuah@kernel.org \
--cc=vkuznets@redhat.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox