summaryrefslogtreecommitdiffstats
path: root/test/kvm-eviction.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/kvm-eviction.c')
-rw-r--r--test/kvm-eviction.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/test/kvm-eviction.c b/test/kvm-eviction.c
index d25b29c..5347f35 100644
--- a/test/kvm-eviction.c
+++ b/test/kvm-eviction.c
@@ -23,53 +23,6 @@ extern uint8_t guest_with_stop[];
extern uint8_t guest_without_start[];
extern uint8_t guest_without_stop[];
-static const char *vmtype;
-
-uint64_t
-vm_get_rip(struct kvm *kvm)
-{
- struct kvm_regs regs;
- uint64_t rip;
- int ret;
-
- if (!strcmp(vmtype, "sev-snp")) {
- rip = snp_dbg_decrypt_rip(kvm->vmfd);
- } else if (!strcmp(vmtype, "sev-es")) {
- rip = sev_dbg_decrypt_rip(kvm->vmfd);
- } else {
- ret = ioctl(kvm->vcpufd, KVM_GET_REGS, &regs);
- if (ret == -1) err(1, "KVM_GET_REGS");
- rip = regs.rip;
- }
-
- return rip;
-}
-
-void
-vm_init(struct kvm *kvm, void *code_start, void *code_end)
-{
- size_t ramsize;
-
- ramsize = L1_SIZE;
- if (!strcmp(vmtype, "kvm")) {
- kvm_init(kvm, ramsize, code_start, code_end);
- } else if (!strcmp(vmtype, "sev")) {
- sev_kvm_init(kvm, ramsize, code_start, code_end);
- } else if (!strcmp(vmtype, "sev-es")) {
- sev_es_kvm_init(kvm, ramsize, code_start, code_end);
- } else if (!strcmp(vmtype, "sev-snp")) {
- sev_snp_kvm_init(kvm, ramsize, code_start, code_end);
- } else {
- errx(1, "invalid version");
- }
-}
-
-void
-vm_deinit(struct kvm *kvm)
-{
- kvm_deinit(kvm);
-}
-
void
collect(struct kvm *kvm, uint8_t *counts)
{